我正在与 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