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

AD-321 Implement Configuration for Enabling Express Payments - log fix #494

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
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 @@ -21,7 +21,11 @@
merchantAccount: '${merchantAccount}',
label: ['visible-xs', 'hidden-xs'],
pageType: '${pageType}',
productCode: '${product.code}'
productCode: '${product.code}',
googlePayExpressEnabledOnCart: ${expressPaymentConfig.googlePayExpressEnabledOnCart},
applePayExpressEnabledOnCart: ${expressPaymentConfig.applePayExpressEnabledOnCart},
googlePayExpressEnabledOnProduct: ${expressPaymentConfig.googlePayExpressEnabledOnProduct},
applePayExpressEnabledOnProduct: ${expressPaymentConfig.applePayExpressEnabledOnProduct},
}

var checkoutConfig = {
Expand All @@ -32,12 +36,7 @@
id: '${sessionData.id}',
sessionData: '${sessionData.sessionData}'
},
countryCode: 'US',
googlePayExpressEnabledOnCart: ${expressPaymentConfig.googlePayExpressEnabledOnCart},
applePayExpressEnabledOnCart: ${expressPaymentConfig.applePayExpressEnabledOnCart},
googlePayExpressEnabledOnProduct: ${expressPaymentConfig.googlePayExpressEnabledOnProduct},
applePayExpressEnabledOnProduct: ${expressPaymentConfig.applePayExpressEnabledOnProduct},

countryCode: 'US'
}

window.onload = function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ var AdyenExpressCheckoutHybris = (function () {
initExpressCheckout: async function (params, config) {
var checkoutPromise = this.initiateCheckout(config);
checkoutPromise.then((checkout) => {
if(params.pageType === 'cart' && config.googlePayExpressEnabledOnCart || params.pageType === 'PDP' && config.googlePayExpressEnabledOnProduct) {
if (params.pageType === 'cart' && params.googlePayExpressEnabledOnCart || params.pageType === 'PDP' && params.googlePayExpressEnabledOnProduct) {
this.initiateGooglePayExpress(checkout, params)
}
if(params.pageType=== 'cart' && config.applePayExpressEnabledOnCart || params.pageType === 'PDP' && config.applePayExpressEnabledOnProduct) {
if (params.pageType === 'cart' && params.applePayExpressEnabledOnCart || params.pageType === 'PDP' && params.applePayExpressEnabledOnProduct) {
this.initiateApplePayExpress(checkout, params)
}
});
Expand Down
Loading