PayPal Donation Button: Adding 'Amount' and 'Currency'

后端 未结 4 1453
庸人自扰
庸人自扰 2021-01-03 01:37

I have the \"normal\" PayPal donation button. I want to add two multiple choice fields: Amount and Currency as the image below. So the user

4条回答
  •  温柔的废话
    2021-01-03 02:27

    Hosted PayPal buttons allow you to send option variables, but when not for a donation button, be sure that the option values (for drop downs / text boxes) match exactly what is saved in your PayPal account. i.e. do not edit drop down boxes PayPal creates for you.

    As for adding drop down boxes / text boxes to a hosted button, perfectly possible, as long as they do not alter the payment amount. So, for creating a hosted donation button that allows you to edit the amount, I advise the following:

    1. Create a buy now button on PayPal, adding the drop down boxes and/or text boxes you wish to add to your donation button. Create this button as if you were creating your donation button, because that is exactly what we will be doing, changing this button into a donation button.
    2. Copy the the whole buy now button HTML code, paste into notepad, or an editor where you can use 'find and replace'.
    3. Replace all occurances of 'buynow' with 'donate' (This usually just changes the image). Also, replace '_xclick' with '_donations'. (to tell PayPal how to generate the checkout page)

    You now have a donation button

提交回复
热议问题