I have a donation script at this moment where the user inputs the donation amount on the Paypal website. The problem with this is that some people donate $0.30 which equates to $0 after Paypal fees. I want to put first check the amount donated using an input on my website and then send off the amount to the Paypal website where they can continue to enter their credit card information and what not. How do I do this? Do I have to change to another mode? or am I supposed to send the amount to Paypal and then they’ll know how it’s handled?
Share
You can add a simple check using javascript on the page.
Start with the “donate” button disabled.
In the edit field where the user enters their donation amount, add onblur and onkeyup handlers that call an update() function.
Add a javascript update() function that then reads the entered text, and enables the “donate” button if the value entered is valid, and disables it if it is invalid.
(or thereabouts 🙂