I wish to do a redirect from the process_payment in my custom payment gateway for Wordpress/Woocommerce.
To do a GET redirect you would do:
function process_payment( $order_id ) {
//some code here
//CPN is a value entered by user from custom payment field
$cpn = $_POST['cpn'];
return array(
'result' => 'success',
'redirect' => 'https://www.sandbox.bankserver.com/cgi-bin/webscr?test_ipn=1&CPN='. $cpn
);
}
The values received from the user in custom payment fields are security sensitive so the bank does not want to receive them via GET. How can I do a POST?
I will POST to the bank URI...which will allow the user to enter CVV on the bank page and then redirect back to my Wordpress site.