In developer mode, I've tested credit cards that usually give the correct response (invalid expiration date, invalid card number, accepted, etc.). However, when I enter in my credit card and intentionally put in something incorrect (such as wrong year) and pass it through, it goes through as accepted. This shouldn't happen because it's not an actual valid card, yet I can't seem to get the proper error response to appear, just that it's accepted.
How can I go about getting this to work in development? This applies to any scenario where a card should be declined and the transaction shouldn't return a success, but still does.
01-14-2021 04:31 PM
In the production system the expiration date will be passed on through the system to be validated by the card issuer. In the sandbox there are no live processor connections and the transaction will not reach the issuer. As a result, an expired card will not result in a decline in the test system unless you use the test triggers.
Using the Transaction Amount Triggers, submit a request with the amount of $8 to generate an expired card response.
here: https://developer.authorize.net/hello_world/testing_guide.html
01-15-2021 08:09 AM
An expired card works; I meant that I'd enter in the incorrect expiration date (2023 instead of 2024, for example) and it would still go through, or if I test a card that has no more credit available and still gets "charged".
01-15-2021 09:24 AM
The same principle applies - the sandbox doesn't go out to the card issuer so the responses are simulated. Due to that, no expiration dates or card verifications (outside of basic field & data type validations) occur in the sandbox.
In the cases you have described, the simulator will return a successful response.
01-15-2021 10:46 AM
So is there any way to test the cases I've mentioned in a non-live environment, or do I just have to test in a live environment and debug from there?
01-15-2021 04:43 PM
See the Testing Guide. You set the Bill-to zip to certain values to get a different return.
01-17-2021 07:36 AM