0
我在我自己的购物车的最后阶段将贝宝整合到我的网站中。 我现在只是在沙箱里练习。所以我在我的购物车页面上有一个表单,它将每个商品的价格发送到这个地址的paypal https://www.sandbox.paypal.com/cgi-bin/webscrpaypal发送回交易ID和身份令牌失败4020
这很好,因为它在用户输入他们的付款细贝宝。现在我被困在那里我送回事务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="[email protected]">
<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>
所以在我返回URL我有这样的:
<?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>
在我的回报网址'MyIdentityNumber'在我的沙盒商户帐户中被替换为身份标记。我已经阅读了很多关于它的信息,我找不到合适的信息。非常感谢mil提供任何建议。 Sarah