1

I am using Magento2.3.1 and I have to use payment method credit card authorize.net and right now I set payment method as sandbox mode after place order all fillup information correctly but getting the issue on the checkout page

An error occurred during processing. Please try again.

In console getting this error on network response is

{"messages":{"resultCode":"Error","message":[{"code":"E00001","text":"An error occurred during processing. Please try again."}]}}

below my configuration setting share with you

enter image description here

Thanks in advance

2
  • Check exception log file at root/var/ folder Commented Aug 6, 2019 at 9:34
  • not getting any error on log
    – Rv Singh
    Commented Aug 6, 2019 at 9:55

1 Answer 1

1

I've faced the same issue with Authorize.net AcceptJs payments in Sandbox mode.

After debugging, I've found that the SHA512 key is not matched with the generated transaction key. The issue is because of the Float value of the transaction amount.

I've fixed this issue by overriding the generateSha512Hash() of the AcceptJs core module in my custom module.

private function generateSha512Hash(
    string $merchantKey,
    string $merchantApiLogin,
    string $amount,
    string $transactionId
): string {
    if($amount == floor($amount)){
        $message = '^' . $merchantApiLogin . '^' . $transactionId . '^' . $amount . '^';
    } else {
        $message = '^' . $merchantApiLogin . '^' . $transactionId . '^' . (float)$amount . '^';
    }

    return strtoupper(hash_hmac('sha512', $message, pack('H*', $merchantKey)));
}

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.