mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Remove console logs
This commit is contained in:
parent
5eb39de540
commit
2e6f403ed1
3 changed files with 3 additions and 18 deletions
|
@ -119,8 +119,6 @@ class AxoManager {
|
||||||
if (this.status.hasProfile) {
|
if (this.status.hasProfile) {
|
||||||
const { selectionChanged, selectedAddress } = await this.fastlane.profile.showShippingAddressSelector();
|
const { selectionChanged, selectedAddress } = await this.fastlane.profile.showShippingAddressSelector();
|
||||||
|
|
||||||
//console.log('selectedAddress', selectedAddress);
|
|
||||||
|
|
||||||
if (selectionChanged) {
|
if (selectionChanged) {
|
||||||
this.setShipping(selectedAddress);
|
this.setShipping(selectedAddress);
|
||||||
this.shippingView.refresh();
|
this.shippingView.refresh();
|
||||||
|
@ -139,12 +137,7 @@ class AxoManager {
|
||||||
this.el.changeCardLink.on('click', async () => {
|
this.el.changeCardLink.on('click', async () => {
|
||||||
const response = await this.fastlane.profile.showCardSelector();
|
const response = await this.fastlane.profile.showCardSelector();
|
||||||
|
|
||||||
//console.log('card response', response);
|
|
||||||
|
|
||||||
if (response.selectionChanged) {
|
if (response.selectionChanged) {
|
||||||
|
|
||||||
//console.log('response.selectedCard.paymentToken', response.selectedCard.paymentToken);
|
|
||||||
|
|
||||||
this.setCard(response.selectedCard);
|
this.setCard(response.selectedCard);
|
||||||
this.setBilling({
|
this.setBilling({
|
||||||
address: response.selectedCard.paymentSource.card.billingAddress
|
address: response.selectedCard.paymentSource.card.billingAddress
|
||||||
|
@ -544,8 +537,6 @@ class AxoManager {
|
||||||
});
|
});
|
||||||
this.setCard(authResponse.profileData.card);
|
this.setCard(authResponse.profileData.card);
|
||||||
|
|
||||||
//console.log('authResponse', authResponse);
|
|
||||||
|
|
||||||
this.setStatus('validEmail', true);
|
this.setStatus('validEmail', true);
|
||||||
this.setStatus('hasProfile', true);
|
this.setStatus('hasProfile', true);
|
||||||
|
|
||||||
|
@ -567,8 +558,6 @@ class AxoManager {
|
||||||
this.setStatus('validEmail', true);
|
this.setStatus('validEmail', true);
|
||||||
this.setStatus('hasProfile', false);
|
this.setStatus('hasProfile', false);
|
||||||
|
|
||||||
//console.log('this.cardComponentData()', this.cardComponentData());
|
|
||||||
|
|
||||||
this.cardComponent = await this.fastlane
|
this.cardComponent = await this.fastlane
|
||||||
.FastlaneCardComponent(
|
.FastlaneCardComponent(
|
||||||
this.cardComponentData()
|
this.cardComponentData()
|
||||||
|
@ -678,8 +667,9 @@ class AxoManager {
|
||||||
// Ryan flow.
|
// Ryan flow.
|
||||||
const form = document.querySelector('form.woocommerce-checkout');
|
const form = document.querySelector('form.woocommerce-checkout');
|
||||||
const formData = new FormData(form);
|
const formData = new FormData(form);
|
||||||
|
const submitContainerSelector = '.woocommerce-checkout-payment';
|
||||||
|
|
||||||
disable('.woocommerce-checkout-payment');
|
disable(submitContainerSelector);
|
||||||
|
|
||||||
// Fill in form data.
|
// Fill in form data.
|
||||||
Object.keys(data).forEach((key) => {
|
Object.keys(data).forEach((key) => {
|
||||||
|
@ -698,7 +688,7 @@ class AxoManager {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
enable('.woocommerce-checkout-payment');
|
enable(submitContainerSelector);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -110,7 +110,6 @@ class FormFieldGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
inputElement(name) {
|
inputElement(name) {
|
||||||
console.log('inputElement', name);
|
|
||||||
const baseSelector = this.fields[name].selector;
|
const baseSelector = this.fields[name].selector;
|
||||||
|
|
||||||
const select = document.querySelector(baseSelector + ' select');
|
const select = document.querySelector(baseSelector + ' select');
|
||||||
|
|
|
@ -15,11 +15,9 @@ class Fastlane {
|
||||||
window.paypal.Fastlane(config)
|
window.paypal.Fastlane(config)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.init(result);
|
this.init(result);
|
||||||
console.log('[AXO] Connected', result);
|
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('[AXO] Failed to connect', error);
|
|
||||||
reject();
|
reject();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -32,8 +30,6 @@ class Fastlane {
|
||||||
this.FastlaneCardComponent = this.connection.FastlaneCardComponent;
|
this.FastlaneCardComponent = this.connection.FastlaneCardComponent;
|
||||||
this.FastlanePaymentComponent = this.connection.FastlanePaymentComponent;
|
this.FastlanePaymentComponent = this.connection.FastlanePaymentComponent;
|
||||||
this.FastlaneWatermarkComponent = this.connection.FastlaneWatermarkComponent
|
this.FastlaneWatermarkComponent = this.connection.FastlaneWatermarkComponent
|
||||||
|
|
||||||
console.log('[AXO] Fastlane initialized', this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setLocale(locale) {
|
setLocale(locale) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue