Paypal custom amount for “Donate Now” button

后端 未结 2 1899
野趣味
野趣味 2020-12-05 12:35

I\'ve been asked to implement Paypal \"Donate Now\" functionality on a web site, similar to Wikipedia\'s site.

I know how to generate \"Buy/Donate Now\" buttons wit

相关标签:
2条回答
  • 2020-12-05 12:47

    Yes, there's an HTML input parameter for this. Simply called 'amount'.
    See https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables

    Just include amount in any HTML input/select field and ensure you pass it over to PayPal. For example:

    <label for="amount">Enter the amount you wish to donate:</label> 
    <input type="text" id="amount" name="amount" value"">
    

    Or;

    <label for="amount">Select the amount you wish to donate:</label> 
    <select name="amount" id="amount">
    <option value="5.00">$5.00</option>
    <option value="25.00">$25.00</option>
    <option value="50.00">$50.00</option>
    </select>
    
    0 讨论(0)
  • 2020-12-05 13:10

    Wikipedia uses some server-side scripting to create a transaction before it sends you to Paypal. This is the shopping cart functionality, yes, specifically the Express Checkout part.

    I believe that this image illustrates the process:


    (source: paypal.com)

    Don't worry - it looks harder than it is: it's very easy to implement.

    0 讨论(0)
提交回复
热议问题