CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 166 forks source link

Authorize.net: Can not submit form with decimal value in amount #3166

Open evolluti0n opened 5 years ago

evolluti0n commented 5 years ago

Is This A Feature Request?

No. I think is a bug

What Version Of Caldera Forms, WordPress and PHP Are You Using?

WordPress Version 5.1.1 PHP Version 7.1 Caldera Forms Version 1.8.4 Caldera forms/Authorize.net : 2.1.3.1

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

Yes. I tested with all other plugins disabled and with Twenty Seventeen theme

What Is The Unexpected Behaviour?

I have an authorize.net payment form and whenever an amount (number) is entered with a decimal (ex:1.22), it gives an error and does not allow submission. (This value seems to be invalid.)

So, to avoid this, I did the following: Change the HTML5 type to text Enable Masked input option In Mask, added the following conditional: [{9*.99}]

The error in the number field was removed, but now, can not submit the form. I got a JS error

What PHP Errors Have You Logged While Reproducing This Bug?

No PHP errors.

What JavaScript Errors Have You Seen While Reproducing This Bug?

Uncaught TypeError: Cannot read property 'isAlternator' of undefined at Object.analyseMask (caldera-forms-front.min.js?ver=1.8.4:3) at Object.b.analyseMask (caldera-forms-front.min.js?ver=1.8.4:3) at f (caldera-forms-front.min.js?ver=1.8.4:1) at g (caldera-forms-front.min.js?ver=1.8.4:1) at HTMLInputElement. (caldera-forms-front.min.js?ver=1.8.4:3) at Function.each (jquery.js?ver=1.12.4:2) at e.mask (caldera-forms-front.min.js?ver=1.8.4:2) at HTMLInputElement. (caldera-forms-front.min.js?ver=1.8.4:3) at Function.each (jquery.js?ver=1.12.4:2) at a.fn.init.each (jquery.js?ver=1.12.4:2) analyseMask @ caldera-forms-front.min.js?ver=1.8.4:3 b.analyseMask @ caldera-forms-front.min.js?ver=1.8.4:3 f @ caldera-forms-front.min.js?ver=1.8.4:1 g @ caldera-forms-front.min.js?ver=1.8.4:1 (anonymous) @ caldera-forms-front.min.js?ver=1.8.4:3 each @ jquery.js?ver=1.12.4:2 mask @ caldera-forms-front.min.js?ver=1.8.4:2 (anonymous) @ caldera-forms-front.min.js?ver=1.8.4:3 each @ jquery.js?ver=1.12.4:2 each @ jquery.js?ver=1.12.4:2 a.fn.inputmask.a.fn.inputmask @ caldera-forms-front.min.js?ver=1.8.4:3 j @ caldera-forms-front.min.js?ver=1.8.4:1 Caldera_Forms_Field_Config.init @ caldera-forms-front.min.js?ver=1.8.4:1 (anonymous) @ caldera-forms-front.min.js?ver=1.8.4:5 each @ jquery.js?ver=1.12.4:2 each @ jquery.js?ver=1.12.4:2 (anonymous) @ caldera-forms-front.min.js?ver=1.8.4:5 (anonymous) @ caldera-forms-front.min.js?ver=1.8.4:5 load (async) (anonymous) @ caldera-forms-front.min.js?ver=1.8.4:5

Shelob9 commented 5 years ago

Which auth.net processor is this issue related to? The auth.net add-on provides 3 or 4 payment processors. Can you please let me know which one you are testing with? An export of the form or a link to the relevant helpscout ticket would also help a lot.

evolluti0n commented 5 years ago

The authorize.net processor is Single Payment

Related ticket: https://secure.helpscout.net/conversation/817659170/20120?folderId=832043

Please find attached the exported form. pay-new-export.zip

Best regards

evolluti0n commented 5 years ago

Hi

We have another ticket about this. The client is asking for an update to this case. Can we provide a workaround about this problem? https://secure.helpscout.net/conversation/867491219/21351?folderId=2372292

Thanks