【问题标题】:Recurring paypal donation经常性的贝宝捐赠
【发布时间】:2015-09-07 15:35:31
【问题描述】:

我有一个网页,我想在其中整合定期捐赠

我有以下 HTML 代码,它允许用户插入任何金额,然后单击捐赠以提交该金额。

我想要的是一个厚盒子,一旦按下,就会重复这个数量。顺便提一下,我在 paypal 上有一个企业帐户。

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_donations">
    <input type="hidden" name="business" value="email@domain-x.com">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="Widget Fund">
    <input type="hidden" name="item_number" value="W-001">
    <input type="hidden" name="no_note" value="0">
    <input type="hidden" name="cn" value="Add special instructions to the seller:">
    <input type="hidden" name="no_shipping" value="2">
    <input type="hidden" name="currency_code" value="USD">
    <!-- --><br />
    Please enter your donation amount: (Example - 10.00)<br />
    <input type="text" name="amount" size="5"><br />
    <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"><br />
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><br />
    <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"><br />
</form>

【问题讨论】:

  • 该问题没有公认的答案或任何简单直接的答案。让我们把它变成这样:)
  • 我不清楚你在问什么。您是在询问您页面上的 HTML(“...一个厚盒子...”)还是如何集成 PayPal 的定期支付产品之一?
  • @geewiz 我在问我页面上的 HTML。当一些用户选中一个厚框时,我希望每月收取来自&lt;input type="text" name="amount" size="5"&gt; 的值。但我不知道具体该怎么做。

标签: html paypal


【解决方案1】:

PayPal 按钮具有描述付款计划的参数;如果您发送这些参数,那么 PayPal 将设置定期付款而不是单次付款。变量都在这里描述:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HI00JQU

每月 5 美元(无试用或一次性付款)将是: a3=$5(金额) t3=M(期限类型为月) p3=1(每 1 个月)

...然后还有其他参数(在文档中)可以提供更多功能和设置。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,我花了很多时间尝试创建一个表单来询问用户的金额和付款次数。 其实关键不是填a3、t3或者p3!关键是……cmd字段!!

    像这样:

          <input type="hidden" name="cmd" value="_donations">
    

    您将获得唯一的捐款付款(并且您必须使用“金额”字段来指定金额)

    要获得经常性捐款,您必须使用:

        <input type="hidden" name="cmd" value="_xclick-subscriptions  ">
    

    在这种情况下,您必须将“a3”字段用于金额,“t3”用于“时间类型”(D=每天,M=每个月,Y=每年),“p3”用于次数。 您还必须使用“src”和“srt”。 所以,EG:

          a3 = 15  // You donate 15 dollar
          t3 = M  // the unit for time is "month"
          p3 = 1   // The paiment will occur each "unit of time" so each month
          src = 1   // There is a "recurrent paiement"
          srt = 6  // which will happened 6 time
    

    所以在这个例子中,用户将在 6 个月内每个月支付 15 美元

    或者EG:

         a3 = 20  // You donate 30 dollar
         t3 = M  // the unit for time is "month"
         p3 = 3   // The paiment will occur each "unit of time" so each 3 month
         src = 1   // There is a "recurrent paiement"
         srt = 4  // which will happened 4 time
    

    所以在这个例子中,用户将支付 20 美元,每 3 个月,共 4 次。所以一月、四月、七月等等。

    【讨论】:

    • 订阅不等于定期捐款
    猜你喜欢
    • 2013-07-23
    • 2013-02-02
    • 1970-01-01
    • 2011-08-30
    • 2016-11-20
    • 2018-05-07
    • 2011-09-16
    • 2013-12-22
    • 2014-02-28
    相关资源
    最近更新 更多