php - Paypal 通知网址表单中的多个自定义字段

标签 php paypal

Paypal 在其 API 中有 CUSTOM 参数...我想在 CUSTOM 字段中传递多维数组...

  <form id="paypal_form" action="https://sandbox.paypal.com/cgi-bin/webscr" method="post">
    <!-- Identify your business so that you can collect the payments. -->
    <input type="hidden" name="business" value="user@paypal.com">
    <!-- Specify a Buy Now button. -->
    <input type="hidden" name="cmd" value="_xclick">
    <!-- Specify details about the item that buyers will purchase. -->
    <input type="hidden" name="item_name" value="Hot Sauce-12 oz. Bottle">
    <input type="hidden" name="amount" value="10">
    <input type="hidden" name="currency_code" value="USD">
    <!-- Prompt buyers to enter their desired quantities. -->
    <input type="hidden" name="quantity" value="1">
    <input type="hidden" name="notify_url" value="http://www.myurl.com" />
    <!-- Display the payment button. -->
    <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" />
    <input type="hidden" value="1" name="custom[]" />
    <input type="hidden" value="11" name="custom[]" />
  </form>

它在单个自定义字段上工作正常,但多自定义字段不起作用...

最佳答案

您应该传递所有值,例如 1,2,3,4,5,6....

返回 url 你将得到自定义字符串并将其转换为字符串数组

关于php - Paypal 通知网址表单中的多个自定义字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12465052/

相关文章:

rest - shopify transaction api 获取所有交易

wordpress - 我正在尝试将 PayPal Payment 与 WordPress 中的 Contact Form 7 集成,但我的重定向无法正常工作

paypal - WPS 中的 PayPal "amount"格式是什么?

php - 在 cpanel 上启用 allow_url_fopen

javascript - 需要爱尔兰电话号码的正则表达式

PHP在mysql中插入由json对象发布的数据

Paypal 从沙盒变为实时

javascript - Paypal Checkout.js 不调用 onAuthorize()

php - 无法将缓存写入数据库 Laravel

php - Ajax 条件响应不起作用