Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 4
Registered: ‎01-11-2017

Error When Setting Live Credentials of Authorized.net Live Account. Working Fine in Sandbox Account.

[ Edited ]

Hello Friends, I'm Jaimin Vadher,

 

I am Facing a Problem When Setting a Live Authorized.net Acount Login Id and Transaction Id.

 

when i Set my Sandbox Account credentials Its Work fine but when i Set Live Account Credentials it Will Give me a Error with Belows Response.

 

I am Using "authorizenet/authorizenet": "~1.8" PHP SDK.

I have Updated the cert.pem file so Solve the Error : "null" issue of Response.

 

Current Card Payment Response :

 

{

"approved":false,
"declined":true,
"error":false,
"held":false,
"response_code":"2",
"response_subcode":"1",
"response_reason_code":"2",
"response_reason_text":"This transaction has been declined.",
"authorization_code":"",
"avs_response":"Y",
"transaction_id":"6762550968",
"invoice_number":"",
"description":"One-time donation: $120 | One-time gift: $120.00 | Employer will match: No | How did you hear about us: On the board.",
"amount":"240.00",
"method":"CC",
"transaction_type":"auth_capture",
"customer_id":"",
"first_name":"**",
"last_name":"**",
"company":"",
"address":"7**",
"city":"Portland",
"state":"OR",
"zip_code":"97232",
"country":"",
"phone":"503-358-4318",
"fax":"",
"email_address":"**",
"ship_to_first_name":"",
"ship_to_last_name":"",
"ship_to_company":"",
"ship_to_address":"**e",
"ship_to_city":
"Portland",
"ship_to_state":"OR",
"ship_to_zip_code":"97232",
"ship_to_country":"US",
"tax":"",
"duty":"",
"freight":"",
"tax_exempt":"",
"purchase_order_number":"",
"md5_hash":"0D2B3FC092A2BF4E7EE330A6809CE9CC",
"card_code_response":"M",
"cavv_response":"",
"account_number":"XXXX2009",
"card_type":"Visa",
"split_tender_id":"",
"requested_amount":"",
"balance_on_card":"",
"response":"|2|,|1|,|2|,|This transaction has been declined.|,||,|Y|,|6762550968|,||,|One-time donation: $120 | One-time gift: $120.00 | Employer will match: No | How did you hear about us: On the board.|,|240.00|,|CC|,|auth_capture|,||,|**|,|R**|,||,|**l Place|,|Portland|,|OR|,|97232|,||,|503-358-4318|,||,|demo@gmail.com|,||,||,||,|**l Place|,|Portland|,|OR|,|97232|,|US|,||,||,||,||,||,|0D2B3FC092A2BF4E7EE330A6809CE9CC|,|M|,||,||,||,||,||,||,||,||,||,||,||,|XXXX2009|,|Visa|,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||"

}

 

Right now i have a Error : "This transaction has been declined".

 

Hello Friends, can Anyone help what's Going on here.

 

Thanks.

Member
Posts: 7
Registered: ‎01-05-2017

Re: Error When Setting Live Credentials of Authorized.net Live Account. Working Fine in Sandbox Acco

Hello,

 

I am just learning the Authorize.Net api as well, but when you change to live, are you changing your environment variable to PRODUCTION ?

 

The login id and transaction key for production and sandbox are different, so maybe this could be the problem as well. 

 

So :

 

- Check to make sure you set your environment to PRODUCTION instead of SANDBOX

 

- Check to make sure you are using production login id and transaction key

 

 

Posts: 2,765
Topics: 57
Kudos: 270
Blog Posts: 67
Registered: ‎12-05-2011

Re: Error When Setting Live Credentials of Authorized.net Live Account. Working Fine in Sandbox Acco

@jaimin

 

A reponse code 2 indicates a general bank decline, or in other words the customer's bank declined the transaction.  

 

Richard

Member
Posts: 4
Registered: ‎01-11-2017

Re: Error When Setting Live Credentials of Authorized.net Live Account. Working Fine in Sandbox Acco

Hello,

 

Thanks for your Response.

 

Can you Please Guide me how to Make the Enviroment to Live. right now I Just Changed the Login ID and Transactrion ID Of my Live Account to Set Live Account. I Am Using PHP SDK for my Project.

 

my authorized.net SDK Version is "authorizenet/authorizenet": "~1.8" and I am Using AuthorizeNetAIM for making a Card Payment.

 

Thanks.

Member
Posts: 1
Registered: ‎01-11-2017

Re: Error When Setting Live Credentials of Authorized.net Live Account. Working Fine in Sandbox Acco

[ Edited ]

Hi Jaimin,
               Please find following lines in your code and replace "SANDBOX" by "PRODUCTION".

code : 
       $response = $controller->executeWithApiResponse(    \net\authorize\api\constants\ANetEnvironment::SANDBOX);

If you not find above code in your written code , please use the following code,

$controller = new AnetController\CreateTransactionController($request);
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);


Thanks,
Hari Kuppuraj
CEO
Trinay Technology Solutions
www.trinay.com
570-575-0475
hari@trinaytech.com