简体   繁体   English

Paypal沙盒PDT失败4020

[英]Paypal sandbox PDT Fail 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);

?>

But when I go to thankyoupage.php?tx=ID, where 'ID' is the transaction ID, I get the following: 但是当我转到thankyoupage.php?tx = ID,其中'ID'是交易ID时,我得到以下信息:

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 )输入错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM