我正在开发一个在线商店,该商店使用自定义PHP脚本与Orbital Chase Paymentech作为网关进行交互。最近,该商店的网站未能处理订单,因为CURL遇到错误。特别是,curl_errno()
返回56
,curl_error()
返回SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
。
然而,对Paymentech的付款请求正在进行中。 (即,我们的请求格式正确,信用卡正在收费。)正确的IP 在Paymentech结束时列入白名单。
这是我们的CURL配置:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Chase Paymentech Gateway/1.0');
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
// curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request);
// curl_setopt($ch, CURLOPT_SSLVERSION, 6);
// curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$result = curl_exec($ch);
我已经尝试过几乎所有合理的CURL设置排列都无济于事。我们总是通过SSL读取错误104得到CURL错误56.我已经尝试过其他stackoverflow问题的建议,也无济于事。
我已从一个付款请求中粘贴了下面的示例日志(其中一些敏感信息被遮盖)。如您所见,请求正在TLSv1.2 / AES128-GCM-SHA256
上运行。我已与Chase确认这是一个可接受的SSL版本和密码。
网站上的证书是最新的,来自Geotrust / RapidSSL,自从我开始处理这个问题以来,已经安装了一个新证书。
有没有人知道这里发生了什么?我可以说,我们的CURL / SSL证书设置会导致通信失败,但我无法确定原因是什么或如何解决。请帮忙!
CURL输出:
* Hostname was NOT found in DNS cache, referer: https://www.==our-url===.org/index.php/payment
* Trying 206.253.186.176..., referer: https://www.==our-url===.org/index.php/payment
* Connected to orbital1.chasepaymentech.com (206.253.186.176) port 443 (#0), referer: https://www.==our-url===.org/index.php/payment
* successfully set certificate verify locations:, referer: https://www.==our-url===.org/index.php/payment
* CAfile: /etc/pki/tls/certs/ca-bundle.crt, referer: https://www.==our-url===.org/index.php/payment
CApath: none, referer: https://www.==our-url===.org/index.php/payment
* SSL connection using TLSv1.2 / AES128-GCM-SHA256, referer: https://www.==our-url===.org/index.php/payment
* Server certificate:, referer: https://www.==our-url===.org/index.php/payment
* subject: C=US; ST=New York; L=New York; O=Chase Paymentech Solutions, LLC; OU=CPS ENA; CN=orbital1.chasepaymentech.com, referer: https://www.==our-url===.org/index.php/payment
* start date: 2017-01-17 00:00:00 GMT, referer: https://www.==our-url===.org/index.php/payment
* expire date: 2018-01-18 23:59:59 GMT, referer: https://www.==our-url===.org/index.php/payment
* subjectAltName: orbital1.chasepaymentech.com matched, referer: https://www.==our-url===.org/index.php/payment
* issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec Class 3 Secure Server CA - G4, referer: https://www.==our-url===.org/index.php/payment
* SSL certificate verify ok., referer: https://www.==our-url===.org/index.php/payment
> POST /AUTHORIZE HTTP/1.0\r, referer: https://www.==our-url===.org/index.php/payment
MIME-Version: 1.0\r, referer: https://www.==our-url===.org/index.php/payment
Content-type: application/PTI41\r, referer: https://www.==our-url===.org/index.php/payment
Content-length: 1148\r, referer: https://www.==our-url===.org/index.php/payment
Content-transfer-encoding: text\r, referer: https://www.==our-url===.org/index.php/payment
Request-number: 1\r, referer: https://www.==our-url===.org/index.php/payment
Document-type: Request\r, referer: https://www.==our-url===.org/index.php/payment
Merchant-id: ############\r, referer: https://www.==our-url===.org/index.php/payment
Host: orbital1.chasepaymentech.com\r, referer: https://www.==our-url===.org/index.php/payment
\r, referer: https://www.==our-url===.org/index.php/payment
\r, referer: https://www.==our-url===.org/index.php/payment
<?xml version="1.0" encoding="UTF-8"?>\r, referer: https://www.==our-url===.org/index.php/payment
<Request>\r, referer: https://www.==our-url===.org/index.php/payment
<NewOrder>\r, referer: https://www.==our-url===.org/index.php/payment
<IndustryType>EC</IndustryType>\r, referer: https://www.==our-url===.org/index.php/payment
<MessageType>AC</MessageType>\r, referer: https://www.==our-url===.org/index.php/payment
<BIN>000002</BIN>\r, referer: https://www.==our-url===.org/index.php/payment
<MerchantID>############</MerchantID>\r, referer: https://www.==our-url===.org/index.php/payment
<TerminalID>001</TerminalID>\r, referer: https://www.==our-url===.org/index.php/payment
<AccountNum>################</AccountNum>\r, referer: https://www.==our-url===.org/index.php/payment
<Exp>0118</Exp>\r, referer: https://www.==our-url===.org/index.php/payment
<CurrencyCode123CurrencyCode>\r, referer: https://www.==our-url===.org/index.php/payment
<CurrencyExponent>2</CurrencyExponent>\r, referer: https://www.==our-url===.org/index.php/payment
<CardSecValInd>1</CardSecValInd>\r, referer: https://www.==our-url===.org/index.php/payment
<CardSecVal>###</CardSecVal>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSzip>A0B1C2</AVSzip>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSaddress1>123 Something St</AVSaddress1>\r, referer: https://www.==our-url===.org/index.php/payment
<AVScity>Somewhere</AVScity>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSstate>ON</AVSstate>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSphoneNum></AVSphoneNum>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSname>Testing</AVSname>\r, referer: https://www.==our-url===.org/index.php/payment
<AVScountryCode>CA</AVScountryCode>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDestzip>A0B1C2</AVSDestzip>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDestaddress1>123 Something St</AVSDestaddress1>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDestcity>Somewhere</AVSDestcity>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDeststate>ON</AVSDeststate>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDestphoneNum></AVSDestphoneNum>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDestname>Testing</AVSDestname>\r, referer: https://www.==our-url===.org/index.php/payment
<AVSDestcountryCode>CA</AVSDestcountryCode>\r, referer: https://www.==our-url===.org/index.php/payment
<OrderID>1343</OrderID>\r, referer: https://www.==our-url===.org/index.php/payment
<Amount>1450</Amount>\r, referer: https://www.==our-url===.org/index.php/payment
</NewOrder>\r, referer: https://www.==our-url===.org/index.php/payment
</Request>\r, referer: https://www.==our-url===.org/index.php/payment
/authorize HTTP/1.1\r, referer: https://www.==our-url===.org/index.php/payment
Host: orbital1.chasepaymentech.com\r, referer: https://www.==our-url===.org/index.php/payment
Accept: */*\r, referer: https://www.==our-url===.org/index.php/payment
\r, referer: https://www.==our-url===.org/index.php/payment
* SSL read: error:00000000:lib(0):func(0):reason(0), errno 104, referer: https://www.==our-url===.org/index.php/payment
* Closing connection 0, referer: https://www.==our-url===.org/index.php/payment
答案 0 :(得分:0)
显然重启我们服务器上的防火墙解决了这个问题。我们将其关闭以对我们的证书颁发者进行一些测试,我们注意到该网站有效。当我们重新打开防火墙时,它仍在工作。