定制购物车 paypal 标准集成

发布于 2024-09-24 09:04:59 字数 1860 浏览 0 评论 0原文

我想获得一些有关如何使用自定义购物车设置贝宝付款的帮助。 在产品选择结束时,我想为用户提供付款选项。当选择贝宝时,我想将应付总额重新路由到贝宝,以便用户可以付款。我尝试使用以下表格来执行此操作

<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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情话已封尘 2024-10-01 09:04:59

这有效的关键是“cmd”输入的值必须是“_xclick”,这样贝宝就可以获得交易总额而不是每个项目。

我希望这对其他人有帮助

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="[email protected]">  
 <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="submit" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

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

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="[email protected]">  
 <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="submit" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文