• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Booking Transaction

 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Before saving the itinerary as a paid one, credit card must be authorised. Suppose whole flow is managed by a SLSB.
First step, authorization of the card succeeds and it goes to second step which is, updating the model. But suppose, at that time,the db crashes...

In this type of scenario , what transaction type should I use? Also how can I rollback the TransMaster CC payment?

Thanks a lot,
Murat
 
suekar meredilko
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Murat Balkan:
Hi all,

Before saving the itinerary as a paid one, credit card must be authorised. Suppose whole flow is managed by a SLSB.
First step, authorization of the card succeeds and it goes to second step which is, updating the model. But suppose, at that time,the db crashes...

In this type of scenario , what transaction type should I use? Also how can I rollback the TransMaster CC payment?

Thanks a lot,
Murat



You can assume that :

1) Transmaster api provides 'void transaction' support. i.e. you swipe the card and paid, but you cant update the iternary. In which case you will void the transaction by calling another method on transmaster.
2) You should assume that DB update and Transmaster verification is being done in a single transaction (atomic). So if either fails, you will rollback. For card related api it means that a void transaction call is supported.

In the real world app .. that is how it is done.
 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the reply.
In this type of a tx, how should I implement it?(BMT or CMT)
Thanks,
 
Bobby Sh
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am planning to use BMT. With this I have the flexibility of taking appropriate error handling approach based on actual error.
Say, I got a connection time out with database, i will roll back the payment with showing a message to user :'try after some time' and I will keep the Itinerary saved (without booking it). If the cr. card authorization is failed, I wil delete the Itinerary from the users account.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic