0

I need some advice on how to confirm Paypal payment in case of interrupted internet connection.

Plz take a look at the five steps described on the paypal website: https://developer.paypal.com/docs/integration/mobile/verify-mobile-payment/

1."Your app" makes a successful payment with a PayPal Mobile SDK. 2."Your app" sends data about the payment to your server. 3.Your server can store the payment id value in a database. 4.From your server, you use the payment id value to look up the payment details with the REST API. 5.You verify the payment details, as follows. After a successful payment is made with the MSDK 2.x, the MSDK returns data to your app about the payment (received by the MSDK from the REST API).

Now consider the situation that the internet connection gets interrupted after step 1 and before step 2. That would mean that my customers paid for their goods(I get money on my paypal account), but my server never gets notified about the payment!? How to handle such a situation?!

One solution would be to use IPN to send data to my server.

  1. App contacts my server to get some data. One of it is the "order-id".
  2. Customers order some goods within my app and use paypal for payment.
  3. Payment is done successful.
  4. Paypal sends IPN message to my server for verification.

Now, I am facing the problem, that I do not know how to pass my "order-id" into the payment process in step 2&3 and how to receive that "order-id" back from paypals IPN message to process it further on my server.

kind regards,

Adam

user1804084
  • 116
  • 1
  • 10

0 Answers0