贝宝中的多个项目 [英] multiple items in paypal

查看:64
本文介绍了贝宝中的多个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将多个项目发送到贝宝购物车并遇到问题:

Trying to send multiple items to a paypal cart and having problems:

此(单个项目)可以正常工作:

This (single item) works fine:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="xxx" />
<input type="hidden" name="currency_code" value="USD" />

<input type="hidden" name="amount" value="20.00" />
<input type="hidden" name="item_name" value="1st Item" /> 

<input type="image" src="addcart.gif" name="submit" alt="cart add" />
</form>

此(多个项目,似乎是建议的解决方案)在购物车页面上引发错误,显示为由于卖家网站存在问题,PayPal无法处理此交易.请直接与卖家联系以解决此问题.": <

This (multiple items, seems to be suggested solution) fires an error on the cart page that reads "PayPal cannot process this transaction because of a problem with the seller's website. Please contact the seller directly to resolve this problem.": <

form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="xxx" />
<input type="hidden" name="currency_code" value="USD" />

<input type="hidden" name="amount_1" value="20.00" />
<input type="hidden" name="item_name_1" value="1st Item" /> 

<input type="hidden" name="amount_2" value="20.00" />
<input type="hidden" name="item_name_2" value="2nd Item" /> 

<input type="image" src="addcart.gif" name="submit" alt="cart add" />
</form>

以下两种形式都可以正常工作,但是我试图用一种形式一键完成提交.

Two forms (below) work fine, but I am trying to get the submission done with one form and one click.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="xxx" />
<input type="hidden" name="currency_code" value="USD" />

<input type="hidden" name="amount" value="20.00" />
<input type="hidden" name="item_name" value="1st Item" /> 

<input type="image" src="addcart.gif" name="submit" alt="cart add" />
</form>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="xxx" />
<input type="hidden" name="currency_code" value="USD" />

<input type="hidden" name="amount" value="20.00" />
<input type="hidden" name="item_name" value="2nd Item" /> 

<input type="image" src="addcart.gif" name="submit" alt="cart add" />
</form>

如果我使用以下内容,则可以正常运行,但不会转到购物车页面,而是转到选择付款方式"页面

If I use the following, it works fine, but it doesn't go to the cart page, rather a "Choose your way to pay" page

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="business" value="xxx" />
<input type="hidden" name="currency_code" value="USD" />

<input type="hidden" name="amount_1" value="20.00" />
<input type="hidden" name="item_name_1" value="1st Item" /> 

<input type="hidden" name="amount_2" value="20.00" />
<input type="hidden" name="item_name_2" value="2nd Item" /> 

<input type="image" src="addcart.gif" name="submit" alt="cart add" />
</form>

有什么建议吗?

推荐答案

使用以下两行代码表示的添加到购物车"按钮时,您将无法一次将多个商品添加到购物车.

You would not be able to add multiple items to the cart at once, when using the add to cart button which is indicated by the following two lines of code.

<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />

您必须使用购物车上载命令,才能一次上载多个项目.

You have to use the cart upload command, to be able to upload mutlipe items as once.

<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />

之所以没有将您带到购物车页面,是因为如果您使用的是第三方购物车或自定义购物车,则将使用此方法.如果要向买家显示购物车中的商品,则需要在网站上进行操作,然后再将数据传递给PayPal.在您的网站上,他们会添加,删除或调整数量,然后在准备结帐时,您便是将购买者重定向到PayPal进行支付.

The reason that it does not take you to cart page, is this method is what you would be using if you were using a 3rd party cart, or a customized cart. If you are wanting to show the buyers what is in their cart, you would need to do this on your webiste prior to passing the data over to PayPal. On your website, they would add, remove or adjust the quantity and then when they are ready to checkout is when you would redirect the buyer over to PayPal to pay.

这篇关于贝宝中的多个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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