所以,我創建了一個沙盒事務,並試圖在我的感謝頁面上獲取它的數據。 ?PayPal沙盒PDT失敗4020
<?php
$tx = $_REQUEST['tx'];
$pdti = "REDACTED";
$url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
$data = array("tx" => $tx, "at" => $pdti,"cmd" => "_notify-synch");
$options = array(
"http" => array(
"header" => "Content-type: application/x-www-form-urlencoded\r\n",
"method" => "POST",
"content" => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url,false,$context);
var_dump($result);
?>
但是,當我去thankyoupage.php TX = ID,其中 'ID' 是事務ID,我得到如下:
string(16) "FAIL Error: 4020"
我找不到任何詳細資料這個錯誤意味着什麼,並且完全被卡住了,所以我會很感激任何反饋。
http://www.ridgesolutions.ie/index.php/2010/08/12/paypal-pdt-fail-error-4020/ – aynber
@aynber感謝您指點正確的方向。 – David