Vecta
Vecta

Reputation: 2350

Authorize.Net—Wrong Post URL? Getting an Error

I haven't worked with Authorize.Net before and I'm a bit lost. I've been working my way through the DPM documentation and tried to use the basic code example for PHP with the checkout.php, relay_response.php, and order_receipt.php pages.

When I visit www.myurl.com/checkout.php I can view the form just fine. However, when I submit it it sends the data to test.authorize.net/gateway/transact.dll and I receive the following error:

3,2,13,The merchant login ID or password is invalid or the account is inactive.,,P,0,,,5.99,,auth_capture,,,,,,,,,,,,,,,,,,,,,,,,,,2D7E6D34CFEA4A68908E8F868DFFFFF6,,,,,,,,,,,,,,,,,,,,,,,,,,,,

I am trying to test against the live environment but I can't figure out how to get it to send to "secure.authorize.net/gateway/transact.dll" from the example code. I'm just a bit confused on where I'm going wrong.

Here's my checkout.php:

<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/anet_sdk/AuthorizeNet.php');
$relay_response_url = $_SERVER['DOCUMENT_ROOT'].'/auth/relay_response.php';
$api_login_id = '*********';
$transaction_key = '***********';
$amount = "5.99";
$fp_sequence = "123";
echo AuthorizeNetDPM::getCreditCardForm($amount, $fp_sequence, $relay_response_url, $api_login_id, $transaction_key);
?>

Upvotes: 0

Views: 164

Answers (1)

John Conde
John Conde

Reputation: 219814

There are two possible reasons for this:

  1. Your authentication credentials are incorrect. Verify you are using the right information which may include generating a new transaction key.

  2. You are mixing up production and development environments. Authorize.Net has a developer sandbox for which developers can test their code against without processing any real transactions or incurring any fees. The URL and login credentials for that are different than that of the production environment. Verify that you are using the production environment and not the development environment.

Upvotes: 1

Related Questions