I have a few questions on a PayPal implementation that I am doing for an HTML5 application. I am following the non-receipt payment processing flow and it is working like a charm. I just have a few questions on the PayPal return link and PlayFab Payment Confirmation steps.
The parameters that are returned from PayPal are as follows,
orderId: PayPal invoice number
playfabId: PlayFab User ID
The first question I have is should that orderId be the PayPal invoice number? Or should it be the PlayFab OrderId that is associated to the purchase? If it is supposed to be the PayPal orderId am I missing an API call where you can pass the PayPal invoice number and a PlayFab User Id to Confirm a purchase?
The reason I ask is if the payment is severed (computer crash, browser cache/local storage clear, etc) how can we recover that payment since ConfirmPurchase needs the PlayFab OrderId not the PayPal invoice. Are there any best practices for implementing PayPal IAP on an HTML5 application? My initial thoughts are,
- Store the current purchase PlayFab OrderId in local storage to check on run for confirmation of purchase (unless cache clear)
- Window communication from the payment page to the original window to fire off the confirmation of purchase (Only works if the original window is still there and the user did not copy and paste the confirmation link)
- The confirmation page offers a login so that we can recover the payment and confirm the order (but that only works if we have the order number from PlayFab in the return link parameters)
- Maybe something with CloudScript? But, I am not as familiar with that yet and I am open to suggestions
I would really like to keep my payment confirmation page static and not have to spin up an application stack for it.
Thanks for taking the time to read this and please let me know any further questions or insight you may need.
(Sorry for the double post this I don't know why it combined my drafts!)