Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Adyen/adyen-salesforce-commerce-cloud
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d791d16569ad1b8880c0a9a5f977c1a9d53fea71
Choose a base ref
..
head repository: Adyen/adyen-salesforce-commerce-cloud
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a411830cb73e7f3451d55999582eb410195dfe58
Choose a head ref
Original file line number Diff line number Diff line change
@@ -18,7 +18,10 @@ module.exports.onBrand = function onBrand(brandObject) {
module.exports.fetchGiftCards = async function fetchGiftCards() {
return $.ajax({
url: window.fetchGiftCardsUrl,
type: 'get',
type: 'post',
data: {
csrf_token: $('#adyen-token').val(),
},
});
};

12 changes: 3 additions & 9 deletions src/cartridges/int_adyen_SFRA/cartridge/controllers/Adyen.js
Original file line number Diff line number Diff line change
@@ -9,12 +9,7 @@ const EXTERNAL_PLATFORM_VERSION = 'SFRA';
/**
* Show confirmation after return from Adyen
*/
server.get(
'ShowConfirmation',
server.middleware.https,
csrf.generateToken,
adyen.showConfirmation,
);
server.get('ShowConfirmation', server.middleware.https, adyen.showConfirmation);

/**
* Confirm payment status after receiving redirectResult from Adyen
@@ -52,7 +47,6 @@ server.post(
server.get(
'Redirect3DS1Response',
server.middleware.https,
csrf.generateToken,
adyen.redirect3ds1Response,
);

@@ -202,10 +196,10 @@ server.post(
/**
* Called by Adyen to fetch applied giftcards
*/
server.get(
server.post(
'fetchGiftCards',
server.middleware.https,
csrf.generateToken,
csrf.validateRequest,
adyen.fetchGiftCards,
);