diff --git a/src/cartridges/app_adyen_SFRA/cartridge/client/default/js/commons/index.js b/src/cartridges/app_adyen_SFRA/cartridge/client/default/js/commons/index.js index 04564bf7b..8f32eded5 100644 --- a/src/cartridges/app_adyen_SFRA/cartridge/client/default/js/commons/index.js +++ b/src/cartridges/app_adyen_SFRA/cartridge/client/default/js/commons/index.js @@ -33,6 +33,9 @@ module.exports.getPaymentMethods = async function getPaymentMethods() { return $.ajax({ url: window.getPaymentMethodsURL, type: 'post', + data: { + csrf_token: $('#adyen-token').val(), + }, }); }; diff --git a/src/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js b/src/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js index 301897cb3..6b8dec400 100644 --- a/src/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js +++ b/src/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js @@ -105,7 +105,7 @@ server.post( server.post( 'GetPaymentMethods', server.middleware.https, - csrf.generateToken, + csrf.validateRequest, adyen.getCheckoutPaymentMethods, );