gpt4 book ai didi

html - 通过 Paypal 发送多个产品

转载 作者:太空宇宙 更新时间:2023-11-03 15:57:56 25 4
gpt4 key购买 nike

我想将多个产品发送到 Paypal 。我知道发送产品到payPal的格式是:

 <input type="hidden" name="item_name_x" value="test 1">

不幸的是,它不起作用。您认为问题出在哪里?

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="ronny@hoojima.com">
<input type="hidden" name="item_name_1" value="test 1">
<input type="hidden" name="item_number_1" value="1">
<input type="hidden" name="item_name_2" value="test 2">
<input type="hidden" name="item_number_2" value="2">
<input type="hidden" name="item_name_3" value="test 3">
<input type="hidden" name="item_number_3" value="3">
<input type="hidden" name="amount_1" value="99.00">
<input type="hidden" name="amount_2" value="2">
<input type="hidden" name="amount_3" value="99.00">
<input type="image" name="submit" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png" alt="PayPal - The safer, easier way to pay online">
</form>
</body>
</html>

最佳答案

使用 PayPal 立即购买按钮,您不能传递多个项目。要允许多个项目到 PayPal,请使用“购物车上传”按钮代码。请引用以下示例代码和链接供您引用:

<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="paypalemail"><!-- Add your PayPal Seller/Business email address mandatory-->
<input type="hidden" name="item_name_1" value="Item Name 1"> <!-- sample item name -->
<input type="hidden" name="amount_1" value="1.00"><!-- sample amount -->
<input type="hidden" name="shipping_1" value="1.75"><!-- sample shipping -->
<input type="hidden" name="item_name_2" value="Item Name 2">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="shipping_2" value="2.50">
<input type='hidden' name='invoice' value='your Invoice Id' /> <!-- add Unique invoice for different customer -->
<input type="hidden" name="notify_url" value="www.yourwebsite.com/ipn"> <!-- Please add IPN URL You can use this service to automate back-office and administrative functions, including fulfilling orders, tracking customers, and providing status and other information related to transactions. -->
<input type='hidden' name='currency_code' value='Your currency' />
<input type='hidden' name='cancel_return' value='' /><!-- Take customers to this URL when they cancel their checkout -->
<input type='hidden' name='return' value='' /><!-- Take customers to this URL when they finish their checkout -->
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
</form>

对于 PayPal 按钮 HTML 变量,请引用以下链接:https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

即时付款通知(IPN):https://developer.paypal.com/docs/classic/ipn/gs_IPN/

关于html - 通过 Paypal 发送多个产品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45128964/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com