Skip to content

Commit

Permalink
add canMakePaymentsWithActiveCard
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbinaBaraliu committed Dec 4, 2024
1 parent 1cabf45 commit 5b19645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions view/frontend/templates/component/payment/after.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
// },
async register() {
this.config = this.$wire.get('config');
window.merchantIdentifier = this.config.guid;
this.loadSdk().then(async () => {
this.canDisplay = await BuckarooApplePay.checkPaySupport(this.config.guid);
window.buckarooTask = async () => {
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/web/js/hide-applepay.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ document.addEventListener('DOMContentLoaded', function () {
const checkApplePaySupport = function () {
if (!('ApplePaySession' in window)) return false;
if (typeof ApplePaySession === 'undefined') return false;
return true;
return ApplePaySession.canMakePaymentsWithActiveCard(window.merchantIdentifier);
};

const applePaySupported = checkApplePaySupport();
Expand Down

0 comments on commit 5b19645

Please sign in to comment.