0

我正在与 FirstData wsdl 集成。跟随First Data Global Gateway Web Service API Integration Guide . $kslocation.key文件的路径。$kslocation.pem文件的路径,所有这些路径都是有效的。

$ch = curl_init($wsdl);
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, "$userid:$password");
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSLCERT, $pemlocation);
curl_setopt($ch, CURLOPT_SSLKEY, $kslocation);
curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $keyname);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
echo curl_error($ch)."\n";
curl_close($ch);

给我错误。

SSL read: error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1
alert decrypt error, errno 0
4

1 回答 1

0

问题是我使用的是测试帐户网址。我将其更改为实时网址并且它有效。

于 2012-05-25T10:55:31.857 回答