我迫切需要一些帮助,但我无法在任何地方找到答案。 我需要构建的是一个“立即购买”表单(或按钮),它可以在其中发送多个项目。我正在出售一个事件的门票,成人票和 child 票的价格不同。我已经单独使用过“添加到购物车”按钮,但我的老客户(尤其是移动用户)对此感到困惑。另外,就我而言,这确实不是最专业的方法。 作为一个例子,这里有一个与我需要的类似的表格:http://lowfestival.es/abonos/ (我知道这不是 Paypal 形式,也不一样,但我相信你明白。 我只需要 2 件元素(成人和 child )以及 2 个数量盒和“立即付款”按钮。 如果由于某种原因这是不可能的,任何人都可以推荐可以完成这项工作的免费第 3 方购物车吗? 非常感谢您的帮助。 最诚挚的问候
最佳答案
购物车上传命令将为您执行此操作:https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/cart_upload/
例如:
<form action="https://www.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ee97819b9c8b838f87828f8a8a9c8b9d9dae97819b9c8a81838f8780c08d8183" rel="noreferrer noopener nofollow">[email protected]</a>">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="item_name_1" value="First item name">
<!-- Change this to the price of the first item -->
<input type="hidden" name="amount_1" value="15.00">
Quantity of first item:
<input type="number" name="quantity_1" size="2" min="1" max="99" required="required"><br>
<input type="hidden" name="item_name_2" value="Second item name">
<!-- Change this to the price of the second item -->
<input type="hidden" name="amount_2" value="20.00">
Quantity of second item:
<input type="number" name="quantity_2" size="2" min="1" max="99" required="required"><br>
<input type="image" src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_buynow_cc_171x47.png">
</form>
关于php - 我如何通过 Paypal 的“立即购买”按钮发送多件商品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29545371/