Skip to content

Commit

Permalink
include csrf token on get payment methods (#1217)
Browse files Browse the repository at this point in the history
* chore: include csrf

* chore: validate instead of generating new one
  • Loading branch information
amihajlovski authored Dec 3, 2024
1 parent bf2f5f2 commit 85eba5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ module.exports.getPaymentMethods = async function getPaymentMethods() {
return $.ajax({
url: window.getPaymentMethodsURL,
type: 'post',
data: {
csrf_token: $('#adyen-token').val(),
},
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ server.post(
server.post(
'GetPaymentMethods',
server.middleware.https,
csrf.generateToken,
csrf.validateRequest,
adyen.getCheckoutPaymentMethods,
);

Expand Down

0 comments on commit 85eba5c

Please sign in to comment.