techarch
techarch

Reputation: 1141

Paypal button and site reservation

In my app I plan to use the pay pal buy now button to sell tickets.

My plan is to

  1. When the user selects tickets to buy, create a reservation marker saying 1 ticket have been taken.
  2. Give this reservation a time to live of lets say 15mins. If the user hasnt bought it, I will auto close the reservation and the ticket inventory goes up
  3. The user clicks pay now buton, sends to pay pal. Lets say this takes 30mins
  4. User completes transaction
  5. Paypal calls back to my site

However at this point I would have closed the reservation and they would have paid but I have no ticket for them

How do I handle this pattern?

Upvotes: 0

Views: 58

Answers (1)

CCamilo
CCamilo

Reputation: 887

Using PayPal buy now button you will always have that problem because the payment itself happens in PayPal site and you don't know exactly when.

In your case is better to use an Express Checkout, where the last step of the payment process will occur in your site. This means that you can verify that there are possible reservations just before the payment is done.

If you look at the process flow from the following image, you can verify if reservations are open just before calling DoExpressCheckoutPayment:

enter image description here

Upvotes: 0

Related Questions