Solved! Go to Solution.
โ03-15-2017 05:57 AM
Hi @glyoder,
The Accept.js does take a zip code. If you'd like to test a decline, your best bet would be to insert code that sends the appropriate zip code in with your dispatchData call. Even if your form isn't asking for a zip code, you can still send the value in with your script.
Alternatively, even though our testing guide mentions that testing based on amounts is deprecated, it does still work for now. Sending a transaction of 70.02 through Accept.js will result in a decline.
โ03-15-2017 09:01 AM
Hello @glyoder
The Accept.js library is used solely to create a one-time token, it does not actually perform any additional validation other than simple mathmatical checks.
When you use createTransactionRequest to submit the nonce or one-time token, that is where you can use the testing guide to trigger a decline.
Richard
โ03-15-2017 06:33 AM - edited โ03-15-2017 06:35 AM
Understood, but we don't ask for a zip code in our use case -- we go straight from payment nonce to transaction with minimal info. Since payment amounts no longer trigger an error, I'm not sure how to proceed.
โ03-15-2017 06:41 AM - edited โ03-15-2017 06:42 AM
Hi @glyoder,
The Accept.js does take a zip code. If you'd like to test a decline, your best bet would be to insert code that sends the appropriate zip code in with your dispatchData call. Even if your form isn't asking for a zip code, you can still send the value in with your script.
Alternatively, even though our testing guide mentions that testing based on amounts is deprecated, it does still work for now. Sending a transaction of 70.02 through Accept.js will result in a decline.
โ03-15-2017 09:01 AM
How does this work when using the hosted form? The Accept.js response does not include the zip code.
https://developer.authorize.net/api/reference/features/acceptjs.html#Handling_the_Response
โ08-11-2018 08:05 AM