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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -