Are you looking for test card numbers?

Would you like to contact support?

Plugin icon

Update cryptography

Update your cryptography algorithm if you use a version earlier than 20.1.0.

Salesforce has deprecated the cryptography algorithm that is in Adyen Payments Cartridge - B2C Commerce and Quick Launch versions older than 20.1.0.

If you are using a version older than 20.1.0, then we strongly recommend that you upgrade to the latest version. While you implement the upgrade, you must change the cryptography algorithm in the older version to be compatible with the latest Salesforce cryptography update.

If you don't do this by October 2021, then your integration can be disrupted.

Change the cryptography algorithm

Version 18.x.x

To replace the MD-5 algorithm with SHA-512, do the following in the hpp.isml 1 file:

  1. Find line 67 with the MD-5 algorithm:
    var sessionID = new dw.crypto.MessageDigest(dw.crypto.MessageDigest.DIGEST_MD5).digest(session.sessionID);
  2. Replace the line with the following:

    var digestSHA512 = new dw.crypto.MessageDigest(dw.crypto.MessageDigest.DIGEST_SHA_512);
    var sessionID = dw.crypto.Encoding.toHex(digestSHA512.digestBytes(new dw.util.Bytes(session.sessionID, 'UTF-8')));
  3. Save your changes to the file.

Version 19.x.x

To replace the MD-5 algorithm with SHA-512, do the following in the alternativePaymentMethodForm.isml 2 and AdyenHelper.ds 3 files:

  1. Find the line with the MD-5 algorithm. This is line 31 in the .isml file and line 248 in the .ds file:
    var sessionID = new dw.crypto.MessageDigest(dw.crypto.MessageDigest.DIGEST_MD5).digest(session.sessionID);
  2. Replace the line with the following:

    var digestSHA512 = new dw.crypto.MessageDigest(dw.crypto.MessageDigest.DIGEST_SHA_512);
    var sessionID = dw.crypto.Encoding.toHex(digestSHA512.digestBytes(new dw.util.Bytes(session.sessionID, 'UTF-8')));
  3. Save your changes to the file.

If you need more help, contact your Account Manager or our Support Team.

File paths

1 hpp.isml in version 18.x.x:

/cartridges/int_adyen_overlay/cartridge/templates/default/hpp.isml

2 alternativePaymentMethodForm.isml in version 19.x.x:

/cartridges/int_adyen_SFRA/cartridge/templates/default/checkout/billing/alternativePaymentMethodForm.isml

3 AdyenHelper.ds in version 19.x.x:

/cartridges/int_adyen_overlay/cartridge/scripts/util/AdyenHelper.ds