支付宝支付网关集成在PHP中的响应

时间:2015-08-31 09:11:45

标签: php payment-gateway

我正在使用hipay钱包测试帐户并在那里使用webservices进行集成。交易工作正常,但问题是我没有得到页面中的回复,它被禁止在响应页面上进入 $ _ POST ['xml']

  

$ setUrlAck = show_page_link(“payment / hipay_new / response.php”,true);

以下是我的代码

if ($PaymentDetails['sel_payment_env'] == 1) {
        $wsdl = 'https://ws.hipay.com/soap/subscription?wsdl'; //for live
    } else {
        $wsdl = 'https://test-ws.hipay.com/soap/subscription?wsdl';//for testing
    }
    // If the payment is accepted, the user will be redirected to this page
    $setURLOk= show_page_link(FILE_THANKS."?add=success&OrderNo=".$orderid,true);

    // If the payment is refused, the user will be redirected to this page
    $setUrlNok=show_page_link(FILE_THANKS."?cancleMsg=true",true);

    // If the user cancels the payment, he will be redirected to this page
    $setUrlCancel=show_page_link(FILE_THANKS."?cancleMsg=true",true);

    // The merchant?s site will be notified of the result of the payment by a call to the script
    $setUrlAck =show_page_link("payment/hipay_new/response.php",true); 

    $initArray = array(

            'wsLogin' => $wsLogin,              // Your wsLogin
            'wsPassword' => $wspassword,            // Your wsPassword
            'websiteId' => $txt_Merchant,           // Your webSiteId
            'categoryId' => $PaymentDetails['txt_category_id'],     // Your website category ID (https://test-payment.hipay.com/order/list-categories/id/(websiteId))
            'customerEmail' => $customer_email,                     // Your customers' email
    );
    $options = array(
            'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
            'cache_wsdl' => WSDL_CACHE_NONE,
    );

    $client = new SoapClient($wsdl, $options);
    $data = array(
            'currency' => $currency_code,
            'rating' => 'ALL',
            'locale' => 'fr_FR',
            'manualCapture' =>1,
            'label' => 'My label is a Manged Subscrption Test Service ',
            'customerIpAddress' => $_SERVER["REMOTE_ADDR"],
            'merchantReference' => 'AZERTY',
            'urlCallback' => $setUrlAck, // Here in this page i'm suppossed to get the response in $_POST
            'urlAccept' => $setURLOk,
            'urlCancel' =>$setUrlCancel,
            'payments' => array(
                    'initial' => array(
                            'name' => 'Payment',
                            'description' => 'Payment for printing products',
                            'amount' => $price,
                            'subscriptionId' => 'QWERTY',
                            'periodType' => 'normal',
                            'recurrence' => array(
                                    'frequency' => 0,
                                    'duration' => 'managed'
                            ),
                    ),
            ),
    );

如果有人遇到同样的问题,请指导我

1 个答案:

答案 0 :(得分:0)

问题已解决,问题是我的防火墙设置阻止了响应