PayOne Transaction URL

1.1k Views Asked by At

I send a testpayment to PayOne (Visa Card) and my paymentstatus turns in 2 minutes from "appointed" to "paid", so the payment process is correct.

The String "TSOK" which is needed by PayOne is delivered by my through a print("TSOK").

How can I get the POST vars from my PayOne TransactionStatus URL ?

The PayOne API documentation is not very useful here.

1

There are 1 best solutions below

1
On

I'm not entirely clear what you are asking here, but I'll try to explain how it works from my own observations.

Status changes are sent to your TransactionStatus URL. This will be a POST with a bunch of parameters.

Your transaction status handler must save those details (all plain strings in $_POST) to appropriate storage then return "TSOK" once it has done so. It must do this quickly, because the end user will be waiting for this response when using the "Front end" (aka hosted form) payment method.

If you return anything other than "TSOK" then PAYONE will consider that to be a failure at your end, and will continue to resend the message at intervals until it is finally accepted. So you cannot communicate anything back to PAYONE when it sends you the transaction status other than to say, "got it, thanks!".

When users are being redirected around on the front end, you must keep track of what is happening in the server session. You will have your own transaction ID and the ID generated by PAYONE - use those to look up the transaction status that was saved to the database in the "back channel" notification.

One last quick note: all POST data sent by PAYONE in the transaction status message will be ISO-8859-1 encoded, regardless of what encoding was used to send the payment request in the first place. If your site uses UTF-8 - and most sites will these days - then don't forget to convert the encoding of the incoming data. utf8_encode() will do that.

Hope that helps.