Hey there,
I am developing a checkout handler and the pattern of this payment provider is as follows:
1. The store sends a POST request for the creation of a new payment order with information about user and a single callback url.
2. The payment provider then processes the payment, if all is successful he then sends a POST request to the callback url with information about the transaction in the request body in JSON format.
3. The store can then compare a hash from the body to verify that the request is coming from the payment provider and mark the order as completed and send a receipt to the payment provider.
If the process times out at the payment provider no request to the callback is performed so the store will need to do a timing operation and react after a certain time passes.
So I have two questions:
1. How can I access the POST request and the body of it in the callback from the payment provider?
2. How would you recommend I measure the time since the store POSTs a payment in order to react to a timeout?
I have several examples of payment providers which I got from this site, however all of the ones I have seen use seperate callbackurls(differend parameters in url) to differentiate between successful and unsuccessful payments.
I have caught the callback in the redirect method of the checkoutHandler but that appears to be a GET request with no body.
Reynir