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

Fixes for WePay Credit Card form

This commit is contained in:
David Bomba 2022-02-12 08:33:22 +11:00
parent f7a7b29ebb
commit 4e201b35cf
3 changed files with 7 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=dd6a49267dfe156c3bc9",
"/js/clients/payments/braintree-credit-card.js": "/js/clients/payments/braintree-credit-card.js?id=a334dd9257dd510a1feb",
"/js/clients/payments/braintree-paypal.js": "/js/clients/payments/braintree-paypal.js?id=37950e8a39281d2f596a",
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=ef33c98a506c1f32be7b",
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=916457009e78696019a5",
"/js/clients/payment_methods/wepay-bank-account.js": "/js/clients/payment_methods/wepay-bank-account.js?id=8328c6c32a65cd3e8a3d",
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=59d9913b746fe5a540ff",
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=c2cf632fb3cc91b4ff7c",

View File

@ -59,8 +59,6 @@ class WePayCreditCard {
return;
}
console.log("i DID pass the validation");
return true;
}
@ -111,14 +109,15 @@ class WePayCreditCard {
completePaymentWithoutToken() {
if (!this.validateCreditCardFields()) {
console.log("i did not pass the validation");
this.payNowButton = document.getElementById('pay-now');
this.payNowButton.disabled = false;
this.payNowButton.querySelector('svg').classList.add('hidden');
this.payNowButton.querySelector('span').classList.remove('hidden');
return;
}
console.log("completing payment now");
WePay.credit_card.create({
client_id: document.querySelector('meta[name=wepay-client-id]').content,
user_name: document.getElementById('cardholder_name').value,
@ -175,7 +174,6 @@ console.log("completing payment now");
.getElementById('pay-now')
.addEventListener('click', () => {
this.payNowButton = document.getElementById('pay-now');
this.payNowButton.disabled = true;
this.payNowButton.querySelector('svg').classList.remove('hidden');
this.payNowButton.querySelector('span').classList.add('hidden');