How to Integrate and test Authorize.Net payment gateway with SHA?

Install Authorize.Net payment gateway module

Create a sandBox

Go to account page.

Take “Confirmation URL” from platform Authorize.Net settings and add as relay response url to account setting “Response/Receipt URLs”


Create Signature and Transaction keys at “API Credentials & Keys”

For platform v2: The store should have own URL. URL should be without trailing slash.
53-Virto%20Commerce%20-%20Google%20Chrome

Same setting for paltform v3 should be set.

Go to store payment method settings.

The “Confirmation URL” should be the same as in Authorize.Net account setting
Change “Payment action type” to “Sale”

For platform v2:
Set “API Login ID”, “SHA2 hash key”, “Transaction key” fields in UI by values from Authorize.Net account.

For platform v3:
Add

"Payments": {
    "AuthorizeNet": {
        "ApiLogin": "Your api login", 
        "TxnKey": "Your transaction key",
        "SHA2Hash": "You signature hash"
    }
}

to appsettings.json

How to test:
Bank cart info for testing NUM 4263982640269299 Exp. date 02/2023 CCV 837
Also possible to use credit cart number from Authorize test guid.

For testing payment on local PC necessary to share admin URL through internet. It is possible to do with ngrok

2 Likes

Cool! Could also update https://github.com/VirtoCommerce/vc-module-Authorize.Net/blob/master/README.md?