It would be great if there was a test token that could be used to test the server side code that transmits the AcceptJs token to the Gateway, similiar to the way one uses test credit card numbers.
Agreed. I'm writing tests for my code and it would be so much easier if I could have some set tokens that always works or fails. An API call to generate a test token would work too. Stripe has this and it's awesome.
Yes, it will be very useful for unit tests, because in other case I cannot write tests for my method, which creates customers in your service. In fact I cannot write tests for the whole my service, which works with your SDK, because all actions with recurring billing require payment info, but in my case this info can be created only via opaque tokens.
If you step through the Accept.js script and what it calls, you'll eventually run into the API method that's called to generaten the token/nonce. If you call that API method yourself, you can get tokens returned independent of Accept.js, which would then enable your test processing.
It's not officially documented, so I can't promise it will always work, but at least for now that's an option. I detailed more info including the actual API method in this thread.
We'll continue to look at ways to best serve your needs here, perhaps by documenting and supporting the current API method used, or providing a test token.
We are in the process of supporting the Authorize.net API in addition to Stripe and having a supported way to generate opaque test tokens would be a huge benefit to the effort.
It would be helpful to have a testnonce. Yes, you can use the authorize.net api to get a nonce but it just makes your test all the more fragile. We're not trying to test authorize.net, but how our system behaves when it is given a valid nonce.
This would be very helpful. Having test nonce values would be very helpful in developing software to use Authorize.net's accept api quickly and effortlessly. I've just finished immplementing the square payment api which has a similar iframe square hosted credit card form that returns a nonce value. However, square supplies several different test nonce values which can only be used when submitted to their sandbox api envirnment to assist with rapid development. I believe that any company creating api software for developers to consume should do whatever possible to make immplementation both fast and secure. Providing test nonce values that can only be used when in "sandbox" mode can help speed development for new Authorize.net customers and still be just as secure when in "Live" mode. I'm dissapointed that Authorize.net does not have this ability yet.
It would be great if there was a test token that could be used to test the server side code that transmits the AcceptJs token to the Gateway, similiar to the way one uses test credit card numbers. RapidFS
In fact I cannot write tests for the whole my service, which works with your SDK, because all actions with recurring billing require payment info, but in my case this info can be created only via opaque tokens.