在订单收到页面上交叉检查键

时间:2017-09-18 07:06:48

标签: woocommerce

我试图在Woocommerce中集成自定义支付网关。订单已完成,支付网关正在运行。但来自支付网关的人员提出了数量篡改的高风险漏洞。付款完成后,他们基本上都在更改密钥。他们建议交叉检查密钥并防止woocommerce在密钥更改后生成收据。 enter image description here

我们有什么方法可以查看该密钥。 这是我正在使用的代码:

  $order                  = new WC_Order($oid);
          if ( $ostatus == 'Success'){

                    $transauthorised        = true;
                    $this->msg['message']   = $this->success_message;
                    $this->msg['class']     = 'success';


                        $order->payment_complete($oid);
                        $order->add_order_note('HDFC payment successful<br/>Ref Number/Transaction ID: '.$bankref.'/'.$tid);
                        $order->add_order_note($this->msg['message']);
                        $woocommerce->cart->empty_cart();

                 }
                 else{
                    $this->msg['class'] = 'error';
                    $this->msg['message'] = 'An error occured . '.$failmsg;
                    $order->add_order_note($this->msg['message']);
                    $order->update_status('failed');
                    //extra code can be added here such as sending an email to customer on transaction fail
                 }
             $redirect_url = $order->get_checkout_order_received_url();
            $this->web_redirect( $redirect_url); exit;

0 个答案:

没有答案