(13) The merchant login ID or password is invalid or the account is inactive

三世轮回 提交于 2019-11-29 12:51:07

Aparajita you must check with the API credentials for sandbox in Authorize.Net account

This comes up often and the reasons are always the same:

  1. You are using your production credentials but hitting the sandbox endpoints
  2. You are using your sandbox credentials but are hitting the production endpoints
  3. The credentials you are using are incorrect

Verifying which endpoint you are actually hitting.

If you are testing against the production environment, verify that the URL you have in your code is the actual production URL (or if you are using a framework, the configuration is set to production).

The correct URL for production is https://api2.authorize.net/xml/v1/request.api.

The correct URL for testing is https://apitest.authorize.net/xml/v1/request.api

Verify your credentials

If you are sure that you are hitting the correct endpoint you then need to verify that you are using the correct credentials for that environment.

  • Make sure you are using the API login and transaction key and not the console login and password. They are not the same thing. Only the API login and transaction key will work when accessing the APIs. You can get these after logging in to the console.
  • Double check that the API login is correct in the console.
  • If the API login is correct, from within the customer console generate a new transaction key to verify that you have the correct one.
  • Make sure that the credentials are not accidentally entered incorrectly in your code. Make sure all of the characters are there. Also, the credentials are case sensitive. Make sure you did not capitalize or lowercase those values.
  • If you need to verify your login credentials work set up a MVCE that hits the endpoint you are trying to reach with your API credentials. It should be a simple script that makes a basic API call. This will make it easy to debug why you are getting this error.

Test mode is not the sandbox

It is common to confuse test mode with the sandbox environment. Test mode in production uses the production environment and production credentials. Using the sandbox credentials or URLs will not work.

I used this sample project to solve my problem. This is in TEST Mode.

https://github.com/AuthorizeNet/sdk-dotnet/tree/master/CoffeeShopWebApp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!