定制购物车 paypal 标准集成
我想获得一些有关如何使用自定义购物车设置贝宝付款的帮助。 在产品选择结束时,我想为用户提供付款选项。当选择贝宝时,我想将应付总额重新路由到贝宝,以便用户可以付款。我尝试使用以下表格来执行此操作
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="business login?">
<input type="hidden" name="item_name" value="hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="any Street">
<input type="hidden" name="address2" value="Apt 5">
<input type="hidden" name="city" value="any town">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="00000">
<input type="hidden" name="night_phone_a" value="610">
<input type="hidden" name="night_phone_b" value="555">
<input type="hidden" name="night_phone_c" value="1234">
<input type="hidden" name="email" value="[email protected]">
<INPUT TYPE="hidden" NAME="currency_code" value="CurrencyCode">
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
当我提交此表格时,贝宝仅识别卖家(名称显示在页面中),但不识别其他参数。我还收到这样的消息:“我们检测到此购物车存在问题。如果问题仍然存在,请联系商家。” 知道我做错了什么吗? 我非常感谢您的帮助。
ps:我想指定我是从本地服务器执行此操作。我不知道paypal是否要求卖家先注册一个URL。如果是这样,你知道我必须在贝宝帐户上这样做吗?
I would like to get some help on how to setup paypal payment with a custom cart.
At the end of the product selection I would like to give the user payment options. when choosing paypal I would like to reroute to paypal with the total amount due so the user can make a payment. I am trying to do so with the following form
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="business login?">
<input type="hidden" name="item_name" value="hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="any Street">
<input type="hidden" name="address2" value="Apt 5">
<input type="hidden" name="city" value="any town">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="00000">
<input type="hidden" name="night_phone_a" value="610">
<input type="hidden" name="night_phone_b" value="555">
<input type="hidden" name="night_phone_c" value="1234">
<input type="hidden" name="email" value="[email protected]">
<INPUT TYPE="hidden" NAME="currency_code" value="CurrencyCode">
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
When I submit this form , paypal only recognizes the seller ( the name is shown in the page) but no other parameters. I also get this message :"We have detected a problem with this shopping cart. If the problem persists, please contact the merchant."
Any idea what I am doing wrong?
I greatly appreciate the help.
ps:I would like to specify that I am doing this from a local server. I don't know if paypal require the seller to register a URL first. if so do you know here I would have to do that on the paypal account?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这有效的关键是“cmd”输入的值必须是“_xclick”,这样贝宝就可以获得交易总额而不是每个项目。
我希望这对其他人有帮助
This works the key was the value of the "cmd" input has to be "_xclick" This way paypal gets the total of the transaction rather than each item.
I hope this helps others