tags:

views:

229

answers:

1

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?

Example: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=SGbE2GfDX90hYuesj2R33WHFRQU02X3eGubWF2Yo7U37vTxrOFRjGtuQF7u&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b5efedb82468478c6e115945fd0658595b0be0417afd2208f

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
How would I pass this to Paypal?
Doug
Validate (and have the user correct) the data before sending it to PayPal. That will be the easiest path.
Christopher Altman