1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for js

This commit is contained in:
Lars Kusch 2022-12-17 15:04:06 +01:00
parent 33764a4828
commit aab55a9346
2 changed files with 26 additions and 16 deletions

View File

@ -50,15 +50,20 @@ class ProcessBACS {
this.payNowButton.disabled = true;
this.payNowButton.querySelector('svg').classList.remove('hidden');
this.payNowButton.querySelector('span').classList.add('hidden');
this.stripe.confirmBacsDebitPayment(
document.querySelector('meta[name=pi-client-secret]').content, {
payment_method: token}).then((result) => {
if (result.error) {
return this.handleFailure(result.error.message);
}
this.stripe
.confirmBacsDebitPayment(
document.querySelector('meta[name=pi-client-secret')
.content, {
payment_method: document.querySelector('input[name=token]').value
}
)
.then((result) => {
if (result.error) {
return this.handleFailure(result.error.message);
}
return this.handleSuccess(result);
});
return this.handleSuccess(result);
});
});
}
};

View File

@ -50,15 +50,20 @@ class ProcessBACS {
this.payNowButton.disabled = true;
this.payNowButton.querySelector('svg').classList.remove('hidden');
this.payNowButton.querySelector('span').classList.add('hidden');
this.stripe.confirmBacsDebitPayment(
document.querySelector('meta[name=pi-client-secret]').content, {
payment_method: token}).then((result) => {
if (result.error) {
return this.handleFailure(result.error.message);
}
this.stripe
.confirmBacsDebitPayment(
document.querySelector('meta[name=pi-client-secret')
.content, {
payment_method: document.querySelector('input[name=token]').value
}
)
.then((result) => {
if (result.error) {
return this.handleFailure(result.error.message);
}
return this.handleSuccess(result);
});
return this.handleSuccess(result);
});
});
}
};