Tôi đang cố gắng xác minh thông tin pdt paypal.CURL Yêu cầu sự cố
Tôi đã tạo biểu mẫu mô phỏng và gửi biểu mẫu. CNTT đã làm việc và trả lại thông tin.
Tôi đã thử cùng một yêu cầu làm curl. Nhưng yêu cầu của tôi đang trở lại trống với tôi.
dạng mockup của tôi:
<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 CURL My Code:
$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;
EDIT:
ON theo dõi lỗi curl tôi tìm thấy thông báo sau:
SSL: tên chủ đề chứng chỉ 'www.sandbox.paypal.com' không khớp với tên máy chủ mục tiêu 'sandbox.paypal.com'
dupe có thể có: http://stackoverflow.com/questions/1776827/php-curl-paypal-sandbox –
KoolKabin; vui lòng cập nhật câu hỏi này nếu chúng tôi đã đóng góp cho giải pháp của bạn. – Robert