Currently, the user can enter a quantity less than $1 on Paypal's website and some people are donations result in $0 because of Paypal fees. How can I set the minimum to be a $1 or more?
A:
You could use form validation to ensure the value is >$1 before sending it to Paypal. I would use both Javascript and PHP validation. Javascript is nice because the processing is done on the client and is done before the http request. PHP validation is required because the client could turn off Javascript.
Example of Javascript validation could be something like this:
if(document.contact_form.amount.value <= 1)
{
alert("Please enter in an amount greater or equal than $1");
return false;
}
Also, make sure you have clearly labeled 'helper' text next to the field that says something like "Donation Amount (Minimum of $5)".
Christopher Altman
2010-04-11 02:16:49
How would I pass this to Paypal?
Doug
2010-04-11 02:19:07
Validate (and have the user correct) the data before sending it to PayPal. That will be the easiest path.
Christopher Altman
2010-04-11 02:21:27