通过贝宝支付多个项目(一次) [英] Paying for multiple items (at once) via paypal

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

问题描述

我有一个产品列表,我想在其中添加立即付款"按钮,以便我的客户可以通过 Paypal 付款.

I have a list of products that I'd like to add a "pay now" button to so that I can allow my customers to pay via Paypal.

我已经阅读了文档,但找不到如何执行此操作.我可以添加多个项目,但这不会很方便,因为我已经有了要处理的项目列表.我还需要结帐流程来逐项列出订单,因此 1 个价格的立即购买"也不行.

I've gone through the documentation and can't find how to do this. I can add multiple items, but this is not going to be handy as I already have the list of items to process. I also need the checkout process to itemize the order, so a "buy now" with 1 price is no good either.

感谢任何帮助,我尝试过(没有运气):

Any help appreciated guys, I tried (with no luck):

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="email@domain.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="test 1">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="item_name2" value="test 2">
<input type="hidden" name="item_number2" value="2">
<input type="hidden" name="item_name3" value="test 3">
<input type="hidden" name="item_number3" value="3">
<input type="hidden" name="amount" value="99.00">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>

推荐答案

请参阅此示例并相应地对您的示例进行更改.基本上在数字前的项目名称中添加下划线,并用下划线和数字为金额赋予唯一的名称.

See this sample and make the changes to yours accordingly. Basically add underscore to item name before number and give unique name to amount also with underscore and number.

您必须根据购物车总数为每件商品指定金额.

You have to give amount to each item based on your carts totals.

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

<input type="hidden" name="item_name_1" value="beach ball">
<input type="hidden" name="amount_1" value="15">

<input type="hidden" name="item_name_2" value="towel">
<input type="hidden" name="amount_2" value="20">

<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

指定数量(可选)

<input type="hidden" name="quantity_1" value="1">

关于购物车的更多参考:贝宝购物车

for more reference about cart: Paypal Cart

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

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