Skip to content

Commit

Permalink
Merge pull request #510 from Adyen/bugfix/AD-395
Browse files Browse the repository at this point in the history
Bugfix/ad 395
  • Loading branch information
pjaneta authored Jan 16, 2025
2 parents 8a63698 + 67d0210 commit a195043
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit a195043

Please sign in to comment.