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

Feature/apple express piwoo 319 #949

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"webpack": "^5.89.0"
},
"scripts": {
"watch": "webpack --watch",
"watch": "BASE_PATH=. node_modules/.bin/encore dev --watch",
"build": "BASE_PATH=. node_modules/.bin/encore dev",
"setup": "gulp setup",
"e2e-activation": "npx playwright test --project=activation",
Expand Down
30 changes: 30 additions & 0 deletions resources/js/applepayButtonBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import {ApplePayButtonComponent} from "./blocks/ApplePayButtonComponent";

(
function ({mollieApplePayBlockDataCart}) {
if (mollieApplePayBlockDataCart.length === 0) {
return
}
const {ApplePaySession} = window;
if (!(ApplePaySession && ApplePaySession.canMakePayments())) {
return null;
}

const {registerExpressPaymentMethod} = wc.wcBlocksRegistry;

registerExpressPaymentMethod({
name: 'mollie_wc_gateway_applepay_express',
content: < ApplePayButtonComponent/>,
edit: < ApplePayButtonComponent/>,
ariaLabel: 'Apple Pay',
canMakePayment: () => true,
paymentMethodId: 'mollie_wc_gateway_applepay',
supports: {
features: ['products'],
},
});
}
)
(
window
)
194 changes: 0 additions & 194 deletions resources/js/applepayButtonBlockComponent.js

This file was deleted.

Loading
Loading