cancel
Showing results for 
Search instead for 
Did you mean: 

Determining reason for failure

I am adding Authorize.Net to my client's website for the first time using ASP.NET and the Direct Post Method. Just like probably everybody else, it doesn't work the first time. We have the account in Test Mode, and I am using the API Login ID and Transaction Key that I was given when I signed up for a developer account. I have also included the x_test_request and set it to TRUE. However, the IGatewayResponse I receive from the Send method not only has the Approved property set to False, but many of the fields that I'm guessing should have the values that I set for the IGatewayRequest are empty (for example, CardNumber). I'm sure whatever I'm doing wrong is just a little change that needs fixed (it always is), but I'm not sure how to figure out what it is. I guess my first question is what are all the fields that absolutely must be included, and how can I tell which field is causing it to not be approved? Thank you for any help you can give.

njsokalski
Contributor
8 REPLIES 8

x_test_request will run the account in test mode, which means that it's essentially only going to check a few things on the surface to see if you're doing anything obviously wrong. It's not a good simulation of a real transaction. If you want to test the API properly, get a developer account (card not present) and run it in live mode. The only thing test mode is really good for is verifying that you've put in the correct production login.

TJPride
Expert

I do have a developer (card not present) account, that is the api login id and transaction key that I am using for this test.

Using a developer account is not the same thing as running the developer account in test mode. Do not set x_test_request to TRUE.

What does "developer account in test mode" mean? I know how to put the merchant account in test mode, but how do I put the developer account in test mode? I think it would help if I could see a list of which login ids and transaction keys I should be submitting (developer or merchant) and what mode each of the accounts should be in. Thanks.

You should ALWAYS work in live mode (x_test_request = FALSE) except when you're testing a login to verify that it works, by running through a transaction in test mode. Make sure test mode is turned off in your account interface. If you want to test your code prior to accepting real transactions, use a developer account.

You keep saying things like "your account", but I am confused. I have a merchant account and a developer account, which one am I doing testing with? Should the login id and transaction key that I submit be the ones from the developer or merchant account? Is there anywhere that I can see the exact list of settings/values that I need to use to do the test successfully?

If you are testing, use live mode in a developer account. If you are running real credit card transactions, use live mode in a production account. You want to integrate first using your developer account login, then when everything seems to be working ok, switch over to production. I don't know how else to explain it. Set x_test_request to FALSE, use your developer account API login ID and transaction key, post to the DPM sandbox URL (sandbox = developer).

http://www.authorize.net/support/DirectPost_guide.pdf

 

Unless the URL's are different for .NET:

The sandbox URL is https://test.authorize.net/gateway/transact.dll

The production URL is https://secure.authorize.net/gateway/transact.dll

OK, I haven't changed the test setting in my developer account, and I am using the login id and transaction key from my developer account. So what do I need to do to make it "post to the DPM sandbox URL (sandbox = developer)"? Do I simply need to set the PostBackUrl of my submit button or or the action attribute of my form tag to "https://test.authorize.net/gateway/transact.dll"? Thanks.