Process the answer from external Payment Gateway
-
Hello.
I developed a custom plugin that implement a new payment method.
Inside the “process_payment()” function I do basically 2 steps:– Insert a payment “to_do” into the Payment server (via a SOAP call)
[I receive a “payment_key” as answer]– Redirect the customer to the external url, so it can do the payment.
My external payment gateway accept these parameters in Post:
- payment_key
(obviously, so the customer is redirect to HIS order to pay) - ret_url
This is the URL where the customer will be redirected after the payment.
I set it with “$this->get_return_url( $order )”.
In the URL parameters, after redirect back to the e-commerce there is a “result” parameter, that inform the e-commerce about the payment success (OK – ERROR)
Problem:
To “send” the customer “outside” to process the payment, I used “return” with array:return array( 'result' => 'success', 'redirect' => $PPAurl );
But being the “result” parameter already set to “success”, any response I get from the gateway (as URL parameters), when the browser come back to my e-commerce, I always land on the “Order received” page. The cart is empty, and all seems good.
How can I process the answer (in the url parameters) from the gataway, when I return to my e-commerce after the “external” payment?
How can I “go outside” the ecommerce for the payment, without set to “success” my payment return?
Thanks Everyone.
The page I need help with: [log in to see the link]
- payment_key
- The topic ‘Process the answer from external Payment Gateway’ is closed to new replies.