Integration and Testing

Authorize.Net API questions and help with your payment integration.

Posts: 34
Registered: ‎01-07-2018

Accept Hosted Form - how to handle invalid user input

[ Edited ]

I'm using the accept.js hosted payment form ( and it works great. However, if the user enters incorrect information such as an invalid CVV or zip code (AVS mismatch) the form seems to automatically dismiss itself so once I get the decline result back from my server and display a message to the user that the transaction has been declined, they have to trigger the payment form to show again by re-clicking on whatever they originally clicked on to bring it up in the first place. I realize I can bring it up automatically, but even if I do that then the form will be cleared of their previous input meaning they would have to re-type in everything rather than just the field that was incorrect. Is there any way to handle this using the hosted payment form or do I need to use my own form to gain this level of control? If I have to use my own form, is there any way to easily incorporate the immediate CC number validation as they leave the CC number field? I really like that feature of the hosted payment form. Thanks in advance.

Posts: 7
Registered: ‎03-30-2018

Re: Accept Hosted Form - how to handle invalid user input

I am trying the same thing using Accept.js and their hosted form. The popup looks great and I have not experienced the problem where it vanishes but just started testing it. Did you find a way to test a declined transaction? ZIP code or amount does not seem to work.