如何防止重复的贝宝付款? [英] How to prevent duplicate PayPal payments?

查看:89
本文介绍了如何防止重复的贝宝付款?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的立即付款"按钮,该代码是通过按钮制造商创建的,并添加了自定义"隐藏字段以进行标识. 我想知道是否可以添加一些其他隐藏字段来告诉贝宝此交易不应重复两次".

I have a simple Pay Now button, the code created through the button maker, with a "custom" hidden field added to identify it. I wonder if there is some additional hidden field I can add to tell PayPal that "This transaction should not be made twice".

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="custom" value="{MYUNIQUEID}">
    <input type="hidden" name="hosted_button_id" value="{MYHOSTEDBUTTONID}">
    <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" 
    border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

</form>

现在,客户不太可能再支付两次,但是我注意到,当沙盒出现故障时,我成功两次支付了相同的交易费用.我绝对想避免的事情.当然,不仅可以退还给客户,而且可以退还给我,而且还因为我不想弄乱数据库,并且我想避免进行大量编码以捕获重复的付款...

As it is now it's unlikely that the customer should be able to pay twice, but I noticed that when the Sandbox had a glitch I succeeded in paying the same transaction twice. Something that I absolutely want to avoid. Not just for the customer, that could get refunded, sure, but also since I don't want my database messed up and I would like to avoid extensive coding to catch duplicate payments...

推荐答案

您希望向发票"参数添加唯一标识符; <input type="hidden" name="invoice" value="your unique invoice ID">并在www.paypal.com上您帐户的个人资料">我的销售工具"部分中启用阻止重复付款"

You would want to add a unique identifier to the "invoice" parameter; <input type="hidden" name="invoice" value="your unique invoice ID"> and enable "Block duplicate payments" within the 'Profile' > 'My selling tools' section on your account at www.paypal.com

这篇关于如何防止重复的贝宝付款?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆