Skip to content

Commit

Permalink
feat(SFI-1010): convert get to post (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanikantsingh authored Nov 18, 2024
1 parent ef0f59f commit 8bcb8f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
});
};

Expand Down
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
Expand Up @@ -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
Expand Down Expand Up @@ -52,7 +47,6 @@ server.post(
server.get(
'Redirect3DS1Response',
server.middleware.https,
csrf.generateToken,
adyen.redirect3ds1Response,
);

Expand Down Expand Up @@ -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,
);

Expand Down

0 comments on commit 8bcb8f5

Please sign in to comment.