M
mikekissman
I've built an online reservation website in ASP .NET with a SQL Server
backend. It allows customers to search for available resources, than
charges their credit card a fee to hold the reservation. Here's how I
have it arranged now:
1. Find available resource
2. Store reservation info in database
3. Charge credit card
The problem is, if the credit card fails, I have to go back and delete
the reservation which isn't optimal. If I charge the card first, I run
the risk of charging the card, then the resource not being available if
two people are trying to reserve at the same time.
What I'm looking to do is something like make the reservation
transaction dependant on the credit card result, or any other advice on
a better way to do this. Any help would be appreciated!
backend. It allows customers to search for available resources, than
charges their credit card a fee to hold the reservation. Here's how I
have it arranged now:
1. Find available resource
2. Store reservation info in database
3. Charge credit card
The problem is, if the credit card fails, I have to go back and delete
the reservation which isn't optimal. If I charge the card first, I run
the risk of charging the card, then the resource not being available if
two people are trying to reserve at the same time.
What I'm looking to do is something like make the reservation
transaction dependant on the credit card result, or any other advice on
a better way to do this. Any help would be appreciated!