ApplePay Vaulting Integration

This commit is contained in:
Pedro Silva 2024-01-24 08:47:48 +00:00
parent 827bd2568d
commit 96b83c9d0d
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
7 changed files with 86 additions and 12 deletions

View file

@ -209,11 +209,15 @@ class ApplepayButton {
/**
* Show Apple Pay payment sheet when Apple Pay payment button is clicked
*/
async onButtonClick() {
async onButtonClick(data, actions) {
console.log('data, actions', data, actions);
this.log('onButtonClick', this.context);
const paymentRequest = this.paymentRequest();
window.ppcpFundingSource = 'apple_pay'; // Do this on another place like on create order endpoint handler.
// Trigger woocommerce validation if we are in the checkout page.
if (this.context === 'checkout') {
const checkoutFormSelector = 'form.woocommerce-checkout';