簡體   English   中英

貝寶(Paypal)經常性捐贈

[英]Recurring paypal donation

我有一個網頁,我希望將經常性捐款整合到其中。

我有以下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>

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個月)

...,然后還有其他參數(在文檔中)可提供更多功能和設置。

我遇到了同樣的問題,花了很多時間試圖創建一個向用戶詢問金額和付款次數的表單。 實際上,鍵沒有填充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次。 因此,一月,四月,七月,依此類推。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM