Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/ad 395 #510

Merged
merged 3 commits into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ var AdyenExpressCheckoutHybris = (function () {

const googlePayNodes = document.getElementsByClassName('adyen-google-pay-button');

let paymentData;

const googlePayConfig = {

// Step 2: Set the callback intents.
Expand Down Expand Up @@ -198,9 +200,13 @@ var AdyenExpressCheckoutHybris = (function () {

// Step 7: Configure the callback to get the shopper's information.

onAuthorized: (paymentData, actions) => {
onSubmit: (state, element, actions) => {
this.makePayment(this.prepareDataGoogle(paymentData), this.getGoogleUrl(), actions.resolve, actions.reject)
},
onAuthorized: (data, actions) => {
paymentData = data;
actions.resolve();
},
onError: function (error) {
console.log(error)
}
Expand All @@ -227,7 +233,9 @@ var AdyenExpressCheckoutHybris = (function () {
success: function (response) {
try {
if (response.resultCode && (response.resultCode === 'Authorised' || response.resultCode === 'RedirectShopper')) {
resolve();
resolve({
resultCode: response.resultCode
});
AdyenExpressCheckoutHybris.handleResult(response, false);
} else {
reject();
Expand Down
Loading