我正在尝试验证paypal pdt信息。CURL请求问题
我生成了我的模型表单并提交了它。 IT工作并返回了信息。
我试着做同样的事情使卷曲请求。但是我的请求对我来说是空白的。
我样机形式:
<form method="post" action="https://sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_notify-synch"/>
<input type="hidden" name="at" value="-----"/>
<input type="hidden" name="tx" value="-----"/>
<input type="submit" value="Test"/>
</form>
我卷曲REQ代码:
$arrData = array(
'tx' => '----',
'cmd' => '_notify-synch',
'at' => '-----'
);
$ch = curl_init('https://sandbox.paypal.com/cgi-bin/webscr');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1) ;
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arrData);
$strCurlResult = curl_exec($ch);
curl_close($ch);
return $strCurlResult;
编辑:
ON跟踪卷曲的错误,我发现以下消息:
SSL:证书主题名称'www.sandbox.paypal.com'不匹配 目标主机名“sandbox.paypal.com”
possible dupe:http://stackoverflow.com/questions/1776827/php-curl-paypal-sandbox –
KoolKabin;如果我们对解决方案有所贡献,请更新此问题。 – Robert