【问题标题】:paypal posting back transaction id and identity token fail 4020paypal 回发交易 ID 和身份令牌失败 4020
【发布时间】:2014-07-12 01:39:30
【问题描述】:

我在自己购物车的最后阶段将 paypal 集成到我的网站中。 我现在只是在沙盒中练习。所以我在我的购物车页面中有一个表格,它将每件商品的价格发送到贝宝,地址为https://www.sandbox.paypal.com/cgi-bin/webscr

这很好用,因为在用户在贝宝上输入他们的付款详细信息后,它会返回带有交易 ID 的返回 URL。现在我被困在我用身份令牌发回事务 id 的部分,因为它返回失败 4020。

<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="monk@gmail.com">
<input type="hidden" name="item_name_1" value="Electro">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="item_number_1" value="1">
<input type="hidden" name="item_name_2" value="Dub">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="item_number_2" value="2">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/x-click-but6.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

</form>

所以在我的返回网址中我有这个:

<?php 

$transID = $_GET['tx'];
?>
<!DOCTYPE html>
<html lang="en">
<body>
<form target="paypal" method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr"> 
                <input type="hidden" name="cmd" value="_notify-synch">
                <input type="hidden" name="tx" id="tx" value="<?php echo $transID; ?>"> 
                <input type="hidden" name="at" id="at" value="myIdentityNumber"> 
                <input type="submit" value="PDT"> 
            </form>

</body>
</html>

在我的返回 url 中,“MyIdentityNumber”被我的沙盒业务帐户中的身份令牌替换。我已经阅读了很多关于它的信息,但我找不到正确的信息。感谢一米尔的任何建议。 莎拉

【问题讨论】:

    标签: post paypal eclipse-pdt


    【解决方案1】:

    我实际上错误地复制了我的身份令牌,遗漏了一个字符。哈哈。愚蠢的错误,但至少它现在起作用了。谢谢

    【讨论】:

      猜你喜欢
      • 2013-08-02
      • 1970-01-01
      • 1970-01-01
      • 2014-04-09
      • 1970-01-01
      • 2021-08-13
      • 2012-11-02
      • 2018-07-23
      • 2013-05-09
      相关资源
      最近更新 更多