diff --git a/modules/ppcp-axo/resources/js/AxoManager.js b/modules/ppcp-axo/resources/js/AxoManager.js index 763913cff..e7a7b4aae 100644 --- a/modules/ppcp-axo/resources/js/AxoManager.js +++ b/modules/ppcp-axo/resources/js/AxoManager.js @@ -119,8 +119,6 @@ class AxoManager { if (this.status.hasProfile) { const { selectionChanged, selectedAddress } = await this.fastlane.profile.showShippingAddressSelector(); - //console.log('selectedAddress', selectedAddress); - if (selectionChanged) { this.setShipping(selectedAddress); this.shippingView.refresh(); @@ -139,12 +137,7 @@ class AxoManager { this.el.changeCardLink.on('click', async () => { const response = await this.fastlane.profile.showCardSelector(); - //console.log('card response', response); - if (response.selectionChanged) { - - //console.log('response.selectedCard.paymentToken', response.selectedCard.paymentToken); - this.setCard(response.selectedCard); this.setBilling({ address: response.selectedCard.paymentSource.card.billingAddress @@ -544,8 +537,6 @@ class AxoManager { }); this.setCard(authResponse.profileData.card); - //console.log('authResponse', authResponse); - this.setStatus('validEmail', true); this.setStatus('hasProfile', true); @@ -567,8 +558,6 @@ class AxoManager { this.setStatus('validEmail', true); this.setStatus('hasProfile', false); - //console.log('this.cardComponentData()', this.cardComponentData()); - this.cardComponent = await this.fastlane .FastlaneCardComponent( this.cardComponentData() @@ -678,8 +667,9 @@ class AxoManager { // Ryan flow. const form = document.querySelector('form.woocommerce-checkout'); const formData = new FormData(form); + const submitContainerSelector = '.woocommerce-checkout-payment'; - disable('.woocommerce-checkout-payment'); + disable(submitContainerSelector); // Fill in form data. Object.keys(data).forEach((key) => { @@ -698,7 +688,7 @@ class AxoManager { }) .catch(error => { console.error('Error:', error); - enable('.woocommerce-checkout-payment'); + enable(submitContainerSelector); }); } else { diff --git a/modules/ppcp-axo/resources/js/Components/FormFieldGroup.js b/modules/ppcp-axo/resources/js/Components/FormFieldGroup.js index 32f59b2a0..272df1288 100644 --- a/modules/ppcp-axo/resources/js/Components/FormFieldGroup.js +++ b/modules/ppcp-axo/resources/js/Components/FormFieldGroup.js @@ -110,7 +110,6 @@ class FormFieldGroup { } inputElement(name) { - console.log('inputElement', name); const baseSelector = this.fields[name].selector; const select = document.querySelector(baseSelector + ' select'); diff --git a/modules/ppcp-axo/resources/js/Connection/Fastlane.js b/modules/ppcp-axo/resources/js/Connection/Fastlane.js index 49c28174a..9f2993081 100644 --- a/modules/ppcp-axo/resources/js/Connection/Fastlane.js +++ b/modules/ppcp-axo/resources/js/Connection/Fastlane.js @@ -15,11 +15,9 @@ class Fastlane { window.paypal.Fastlane(config) .then((result) => { this.init(result); - console.log('[AXO] Connected', result); resolve(); }) .catch((error) => { - console.error('[AXO] Failed to connect', error); reject(); }); }); @@ -32,8 +30,6 @@ class Fastlane { this.FastlaneCardComponent = this.connection.FastlaneCardComponent; this.FastlanePaymentComponent = this.connection.FastlanePaymentComponent; this.FastlaneWatermarkComponent = this.connection.FastlaneWatermarkComponent - - console.log('[AXO] Fastlane initialized', this); } setLocale(locale) {