php - How can I get Ogone payment transaction feedback through POST variables
I'm currently building a PHP website which is integrating Ogone API to perform online payment.
At the moment, I have implemented my hidden form containing all the information needed to be sent to the Ogone transaction URL. Once the access is granted and the payment has been authorized, my page is being automatically redirected to another page, as it's supposed to behave.
However I'd like to display on the redirected page some information about the payment itself, as reference number, amount, ... I know there is a way for Ogone to send me that as a transaction feedback once the payment has been performed, but I can't find the way. What I've managed to do so far is retrieve the information passed to the URL, but I don't want that huge URL appearing on the website, this is why I'd like to get those in a POST request.
I've played a bit with the "Direct HTTP server-to-server request " option in the Configuration > Technical Information > Transaction Feedback section, but this hasn't given anything so far. The callback is successfully called but nothing is in the POST when I look it up with this:
file_put_contents( 'debug' . time() . '.log', var_export( $_POST, true));
Any idea about something I might have forgotten?
Answer
Solution:
I ended up activating the "Transaction feedback" parameter, in this panel the first checkbox is allowing payment information to be returned to the redirected page. Whether the Accept/Decline/Cancel/Exception redirection is being triggered doesn't matter, I get the same result anyway.
One of the problem was that I'm not getting anything in the $_POST back, but I found out that the $_REQUEST variable was containing the information I needed, so that's fine for me.
The last issue was that this checkbox also returns everything in GET so it appears in the URL. That's not really a security issue since there is a SHA signature in the parameters to make sure nothing has been altered. This was mainly to avoid a huge URL appearing for the user, so I guess i'll just make a manual redirection once I got what I need from the $_REQUEST.
Answer
Solution:
I noticed in the page I used I was checking the GET and POST values. I am not very familiar with PHP, Could you be getting it back as $_GET and not $_POST.