PayPal立即购买按钮自定义变量不起作用

兹巴利亚

我正在尝试通过3个经典步骤进行付款:

1)带PayNow按钮的订单页面

2)贝宝付款

3)重定向到“付款完成页”

我想要实现的是从第1步到第3步有一个ID。我试图做的就是将此字段插入“ custom”变量中,例如:

<input type="hidden" name="custom" value="--Server Code--">

PayPal付款后,PayPal将我重定向到我的页面:

http://www.mysite.cm/tx=blalba?aaaa

在此URL中没有自定义字段。如果通过API与PayPal联系以获取销售详细信息,则不会得到与自定义字段相关的任何信息。

我做错了什么?我正在考虑使用Cookie的工作,但我更喜欢以标准方式进行。

  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
        <input type="hidden" name="cmd" value="_s-xclick">
        <input type="hidden" name="return" value="testestest">
        <input type="image" src="https://www.paypalobjects.com/it_IT/IT/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal è il metodo rapido e sicuro per pagare e farsi pagare online.">
        <img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1">
    </form>
卡米洛

PayPal自定义变量在IPN(即时付款通知)中返回,而不是在完成付款后将用户返回到您的网站时返回。

在您的情况下,只需一个会话变量就足够了。

编辑:

另一种方法是在“返回”字段中添加适当的url值。例子:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="return" value="http://www.website.com?pram=value">
    <input type="hidden" name="cancel" value="http://www.website.com?param=value">
    <input type="hidden" name="business" value="[email protected]">
    <input type="hidden" name="item_name" value="Test">
    <input type="hidden" name="amount" value="9.00">
    <input type="hidden" name="currency_code" value="EUR">

    <input type="image" src="https://www.paypalobjects.com/it_IT/IT/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal è il metodo rapido e sicuro per pagare e farsi pagare online.">
   <img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1">
</form>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章