Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从woocommerce自定义支付网关中的process_payment功能执行POST重定向?_Php_Wordpress_Woocommerce_Payment Gateway - Fatal编程技术网

Php 如何从woocommerce自定义支付网关中的process_payment功能执行POST重定向?

Php 如何从woocommerce自定义支付网关中的process_payment功能执行POST重定向?,php,wordpress,woocommerce,payment-gateway,Php,Wordpress,Woocommerce,Payment Gateway,我希望在我的Wordpress/Woocommerce自定义支付网关中对支付过程进行重定向 要执行GET重定向,请执行以下操作: 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'

我希望在我的Wordpress/Woocommerce自定义支付网关中对支付过程进行重定向

要执行GET重定向,请执行以下操作:

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
    );
}
在自定义付款字段中从用户接收的值是安全敏感的,因此银行不希望通过GET接收这些值。我怎样才能发帖子


我将发布到银行URI…这将允许用户在银行页面上输入CVV,然后重定向回我的Wordpress站点。

简而言之,我找到了更好的方法。我向3d安全服务器发出了请求,并将详细信息存储在会话中。然后我可以从woocommerce_receipt_页面访问这些内容,然后在该页面上创建表单并发布到银行URI