Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.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
将World Pay支付网关与PHP集成_Php_Payment Gateway_Worldpay - Fatal编程技术网

将World Pay支付网关与PHP集成

将World Pay支付网关与PHP集成,php,payment-gateway,worldpay,Php,Payment Gateway,Worldpay,实施worldpay支付网关快把我逼疯了。我正在尝试使用XML直接方法在php网站中实现worldpay支付网关。我正在使用中的代码来处理所有HTTP请求 但每当我尝试连接到他们的服务器时,我都会收到一条错误消息,即需要授权。我已经在下面的url中提供了所有必需的详细信息 $dest=“https://$merchantCode:$password@secure-test.wp3.rbsworlpay.com/jsp/merchant/xml/paymentService.jsp” 即使我使用c

实施worldpay支付网关快把我逼疯了。我正在尝试使用XML直接方法在php网站中实现worldpay支付网关。我正在使用中的代码来处理所有HTTP请求

但每当我尝试连接到他们的服务器时,我都会收到一条错误消息,即需要授权。我已经在下面的url中提供了所有必需的详细信息

$dest=“https://$merchantCode:$password@secure-test.wp3.rbsworlpay.com/jsp/merchant/xml/paymentService.jsp”

即使我使用curl连接到他们的服务器,我也会收到一条错误消息:找不到url

下面是我正在使用的curl代码

    $ch = curl_init ($url);
    curl_setopt($ch, CURLOPT_POST,1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$xml);   //$xml is the xml string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_NOPROGRESS, 0);

    $result = curl_exec ($ch); // result will contain XML reply from WorldPay curl_close ($ch);
    if ( $result == false )
    {
    $error = "Curl could not retrieve page '$url', curl_exec returns false";               
    }
    echo $error;
    echo $result;
由于没有适当的文档,我请求任何实施它的人帮助我


目前我正在本地主机上测试PHP网站。这就是HTTP请求或curl无法工作的原因吗

可能是防火墙问题还是本地计算机上的网络设置问题?当您在浏览器中浏览到该URL时会发生什么?谢谢您的回复。当我打开该链接时,它会询问XML登录详细信息。但是,当我输入商户代码和密码时,它除了再次询问登录详细信息外,什么也不做。这里我给出了在您的网站上使用WorldPay的简单步骤。