贝宝沙盒PDT失败4020 [英] Paypal sandbox PDT Fail 4020
本文介绍了贝宝沙盒PDT失败4020的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
因此,我创建了一个沙箱交易,并试图在我的感谢页面上获取它的数据.
So, I've created a sandbox transaction and am trying to get the data for it on my thank you page.
<?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,我得到以下信息:
But when I go to thankyoupage.php?tx=ID, where 'ID' is the transaction ID, I get the following:
string(16) "FAIL Error: 4020"
我找不到任何详细说明此错误含义的文档,并且完全陷在其中,因此,对于任何反馈,我将不胜感激.
I can't find any documentation that details what this error means, and am completely stuck, so I'd be grateful for any feedback.
推荐答案
很可能输入了错误的身份验证令牌($pdti
).
Most probably your Authentication Token ($pdti
) is incorrectly entered.
这篇关于贝宝沙盒PDT失败4020的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文