简体   繁体   English

贝宝(Paypal)经常性捐赠

[英]Recurring paypal donation

I have a webpage in which I would like to integrate a recurring donation . 我有一个网页,我希望将经常性捐款整合到其中。

I have the following HTML code, which allows a user to insert any amount, and click donate to submit that sum. 我有以下HTML代码,该代码允许用户插入任何金额,然后单击“捐赠”以提交该金额。

What I would like is a thick box that once pressed, will make that amount recurring. 我想要的是一个厚框,一旦按下该框,该框就会重复出现。 As a mention, I have a business account on paypal. 提一下,我在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>

PayPal buttons have parameters to describe the payment schedule; PayPal按钮具有描述付款时间表的参数; if you send those parameters then PayPal will set up a recurring payment rather than a single payment. 如果您发送这些参数,则PayPal将设置定期付款而不是单次付款。 The variables are all described here: 变量均在此处描述:

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

$5 per month (with no trial or balloon payments) would be: a3=$5 (amount) t3=M (term type is months) p3=1 (every 1 month) 每月5美元(无需试用或大量付款)将为:a3 = $ 5(金额)t3 = M(条款类型为月)p3 = 1(每1个月)

... and then there are additional parameters (in the docs) to offer many more features and settings. ...,然后还有其他参数(在文档中)可提供更多功能和设置。

I've had the same problem and spend a lot of time trying to create a form asking user for amout AND number of payement. 我遇到了同样的问题,花了很多时间试图创建一个向用户询问金额和付款次数的表单。 In fact the key is not filling a3, t3 or p3! 实际上,键没有填充a3,t3或p3! The key is... the cmd field!! 关键是... cmd字段!

Like this: 像这样:

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

you'll get unique donation payement (and you must use the "amount" field to specify the amount) 您将获得独特的捐赠付款(并且您必须使用“金额”字段来指定金额)

To get recuring donation you must use: 要获得捐款,您必须使用:

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

And in this case you'll have to use "a3" field for amount, "t3" for "type of time" (D=each day, M=each month and Y=each year) and "p3" for number of time. 在这种情况下,您必须使用“ a3”字段表示金额,“ t3”字段表示“时间类型”(D =每天,M =每个月,Y =每年),而“ p3”表示时间数。 You must also use "src" and "srt". 您还必须使用“ src”和“ srt”。 So, EG: 因此,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

So in this example, the user will pay 15 dollar, each month during 6 month 因此,在此示例中,用户将在6个月内每月支付15美元

Or EG: 或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

So in this example, the user will pay 20 dollars, each 3 months during 4 times. 因此,在此示例中,用户将支付20美元,每3个月支付4次。 So January, April, July, and so on. 因此,一月,四月,七月,依此类推。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM