TOPIC:

PayPal Button Usage 11 months 5 days ago #237376

  • coll8jm
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 7
  • Thanks: 0
Thank You!! Thank You!

This worked Brilliantly. Very effective and working well.

One thing that has cropped up though in testing, is that if someone puts in the currency symbol (in this case £ for GBP) in the Donation Amount field it gets rejected / error by PayPal on submission.

So the minimum 5.00 works fine
But if minimum £5.00 is entered (as some people might naturally do) it gets an error screen on PayPal, which I have attached.

Would you have any thoughts or suggestion of how I might be able to rectify? Would there be a bit of function code that could strip out £ symbol if used maybe?

Thanks and again and any further help or suggestions anyone could give would be greatly appreciated.

Jamie
Attachments:

Please Log in or Create an account to join the conversation.

PayPal Button Usage 11 months 4 days ago #237393

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 357
  • Karma: 3
  • Thanks: 59
Hello.

You can add a validation condition.
It tests that only numbers with or without a decimal character are entered.
function ff_donationAmount_validation(element, message)
{

    var ex  = /(^-?\d\d*[,\.]?\d*$)/;
	if (!ex.test(element.value)) {
        if (message=='') message = "Please enter donation amount without symbol.";
        ff_validationFocus(element.name);
        return message;
    } // if	
    else if (element.value == "" ) {
        if (message=='') message = "Please enter donation amount.\n"
        ff_validationFocus(element.name);
        return message;
    } // if
   else if ( Number(element.value) <5) {
        if (message=='') message = "Please enter donation amount greater than 5.00.\n"
        ff_validationFocus(element.name);
        return message;
    } // if
    return '';
} // ff_donationAmount_validation

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.045 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!