I am using Magento2.2.5 and payment gateway on my site is Authorized.net I created a sandbox account of Authorized.net and put the required information in the admin panel.
Having Following issues:
The order is created with cancel status.
I received this mail as a merchant: https://prnt.sc/lusbbw , Where Transaction Id and Auth Code is 0
3.When Checkout Order created in the backend but no success page or error on the checkout page, Everything is displaying as they are and the cart is cleared.
Got this error in Exception log:
main.CRITICAL: Please enter a transaction ID to authorize this payment. {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): Please enter a transaction ID to authorize this payment. at /var/www/html/vendor/magento/module-authorizenet/Model/Directpost.php:654)"} []
Even I tried with sandbox gateway URL By replacing Production as below:
Sandbox URLs: https://test.authorize.net/gateway/transact.dll - gateway
https://apitest.authorize.net/xml/v1/request.api - transaction details
Production URLs: https://secure.authorize.net/gateway/transact.dll - gateway
https://api.authorize.net/xml/v1/request.api - transaction details
but nothing helps.
- Payment Log:
main.DEBUG: array ( 'response' => array ( 'x_response_code' => '1', 'x_response_reason_code' => '1', 'x_response_reason_text' => '(TESTMODE) This transaction has been approved.', 'x_avs_code' => 'P', 'x_auth_code' => '000000', 'x_trans_id' => '0', 'x_method' => 'CC', 'x_card_type' => 'Visa', 'x_account_number' => 'XXXX1111', 'x_first_name' => 'Neha', 'x_last_name' => 'Vyas', 'x_company' => '', 'x_address' => '695 Atha Drive', 'x_city' => 'New Orleans', 'x_state' => 'North Carolina', 'x_zip' => '70122', 'x_country' => 'US', 'x_phone' => '504-919-7848', 'x_fax' => '', 'x_email' => '[email protected]', 'x_invoice_num' => '000000021', 'x_description' => '', 'x_type' => 'auth_capture', 'x_cust_id' => '', 'x_ship_to_first_name' => 'Neha', 'x_ship_to_last_name' => 'Vyas', 'x_ship_to_company' => '', 'x_ship_to_address' => '695 Atha Drive', 'x_ship_to_city' => 'New Orleans', 'x_ship_to_state' => 'North Carolina', 'x_ship_to_zip' => '70122', 'x_ship_to_country' => 'US', 'x_amount' => '23.00', 'x_tax' => '0.00', 'x_duty' => '0.00', 'x_freight' => '20.00', 'x_tax_exempt' => 'FALSE', 'x_po_num' => '', 'x_MD5_Hash' => '30A3673E1EF476628D99886A87683A17', 'x_SHA2_Hash' => '', 'x_cvv2_resp_code' => '', 'x_cavv_response' => '', 'x_test_request' => 'true', 'controller_action_name' => 'directpost_payment', 'is_secure' => '1', ), ) [] []
Suggestion how to fix it.
Test Mode
should be disabled, it used only for production testing not for sandbox environment. Also, Authorize.net integration doesn't work on a local environment. Your Magento instance should be available from "public" Internet.Live Mode
in Authorize.net sandbox account should be enabled, not theTest Mode
. Magento configuration is correct.