database - Handling multiple commands as transaction -


im developing payment system performs payment , writes item bought in cloud hosted database, azure.

how works is:

  1. transaction 3rd party payment system
  2. if success, new subscription row in database added user
  3. transaction history , other relevant stuff written database

however, in unlikely event that:

  1. transaction success(http call payment gateway returns success)
  2. for reason, insert in database fails

i end user having paid item without actual subscription item.(since row wont in our database)

these 2 calls not database related (one is, 1 simple async http request) cannot treat them transaction( since cant rollback ).

so question more experienced how handle situation?


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -