第一个数据支付网关问题

时间:2012-11-23 02:55:07

标签: php curl payment-gateway firstdata

我正在尝试在我的网站上投放First data Payment Getway FirstData支付网关的配置文件

define("FDAPI_URL","https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl");
define("FD_USERPWD","WSXXXXXXXX._.1:XXXXXXXX");
define("FD_SSLCERT", "/home/flagcases/domains/usaflagcases.com/public_html/certificate/WSXXXXXXXX._.1.pem"); 
define("FD_SSLKEY","/home/flagcases/domains/usaflagcases.com/public_html/certificate/WSXXXXXXXX._.1.key"); 
define("FD_SSLKEYPASSWD", "ckp_XXXXXXXX"); 
$ch = curl_init(FDAPI_URL);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, FD_USERPWD);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSLCERT, FD_SSLCERT);
curl_setopt($ch, CURLOPT_SSLKEY, FD_SSLKEY);
curl_setopt($ch, CURLOPT_SSLKEYPASSWD, FD_SSLKEYPASSWD);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch); 
if ($result === false)
{
    echo curl_error($ch);
}

总是我得到了卷曲错误 无法使用客户端证书(找不到密钥或错误的密码短语?)卷曲错误

1 个答案:

答案 0 :(得分:1)

请尝试添加WSXXXXXXXX。 .1.p12可能对您有所帮助...您添加了WSXXXXXXXX。 .1.pem和WSXXXXXXXX ._。1.key