Magento 2.X credit card Authorize.net using as set sandbox after place order but checkout page getting error

magento.stackexchange https://magento.stackexchange.com/questions/284539

Вопрос

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

Нет правильного решения

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top