mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 19:14:40 -04:00
Logging for wepay
This commit is contained in:
parent
efcb73b9b3
commit
55bfc1b2bc
File diff suppressed because one or more lines are too long
@ -22,7 +22,7 @@
|
||||
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=2b2fe55f926789abc52f19111006e1ec",
|
||||
"/js/clients/payments/braintree-credit-card.js": "/js/clients/payments/braintree-credit-card.js?id=cf25867ef09115b7f5a209819ba79bbf",
|
||||
"/js/clients/payments/braintree-paypal.js": "/js/clients/payments/braintree-paypal.js?id=5764a8d406c1eda848d073f10d178626",
|
||||
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=119fdd060747388adb10db0a2e83c785",
|
||||
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=dbba20d70fbebb326ddbc46115af9771",
|
||||
"/js/clients/payment_methods/wepay-bank-account.js": "/js/clients/payment_methods/wepay-bank-account.js?id=b8706d7de6127f184ad19b2a810880be",
|
||||
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=e0b1231a7bf6252672836222285c0f52",
|
||||
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=bbab588ed009a93345bec520cbe66869",
|
||||
|
@ -73,15 +73,6 @@ class WePayCreditCard {
|
||||
cardButton.querySelector('svg').classList.remove('hidden');
|
||||
cardButton.querySelector('span').classList.add('hidden');
|
||||
|
||||
var client_address = {};
|
||||
client_address['country'] = document.querySelector(['meta[name=country_code']).content;
|
||||
|
||||
// if(document.querySelector(['meta[name=country_code']).content == 'US'){
|
||||
client_address['postal_code'] = document.querySelector(['meta[name=client-postal-code']).content;
|
||||
// }
|
||||
|
||||
console.log(JSON.stringify(client_address));
|
||||
|
||||
WePay.credit_card.create({
|
||||
client_id: document.querySelector('meta[name=wepay-client-id]').content,
|
||||
user_name: document.getElementById('cardholder_name').value,
|
||||
@ -90,7 +81,10 @@ class WePayCreditCard {
|
||||
cvv: this.myCard.CardJs('cvc').replace(/[^\d]/g, ''),
|
||||
expiration_month: this.myCard.CardJs('expiryMonth').replace(/[^\d]/g, ''),
|
||||
expiration_year: this.myCard.CardJs('expiryYear').replace(/[^\d]/g, ''),
|
||||
address: JSON.stringify(client_address)
|
||||
address: {
|
||||
country : document.querySelector(['meta[name=country_code']).content,
|
||||
postal_code: document.querySelector(['meta[name=client-postal-code']).content
|
||||
}
|
||||
}, (data) => {
|
||||
if (data.error) {
|
||||
cardButton = document.getElementById('card_button');
|
||||
@ -125,16 +119,6 @@ class WePayCreditCard {
|
||||
return;
|
||||
}
|
||||
|
||||
var client_address = {};
|
||||
client_address['country'] = document.querySelector(['meta[name=country_code']).content;
|
||||
|
||||
// if(document.querySelector(['meta[name=country_code']).content == 'US'){
|
||||
client_address['postal_code'] = document.querySelector(['meta[name=client-postal-code']).content;
|
||||
// }
|
||||
|
||||
console.log(JSON.stringify(client_address));
|
||||
|
||||
|
||||
WePay.credit_card.create({
|
||||
client_id: document.querySelector('meta[name=wepay-client-id]').content,
|
||||
user_name: document.getElementById('cardholder_name').value,
|
||||
@ -143,8 +127,11 @@ class WePayCreditCard {
|
||||
cvv: this.myCard.CardJs('cvc').replace(/[^\d]/g, ''),
|
||||
expiration_month: this.myCard.CardJs('expiryMonth').replace(/[^\d]/g, ''),
|
||||
expiration_year: this.myCard.CardJs('expiryYear').replace(/[^\d]/g, ''),
|
||||
address: JSON.stringify(client_address)
|
||||
}, (data) => {
|
||||
address: {
|
||||
country : document.querySelector(['meta[name=country_code']).content,
|
||||
postal_code: document.querySelector(['meta[name=client-postal-code']).content
|
||||
}
|
||||
}, (data) => {
|
||||
if (data.error) {
|
||||
this.payNowButton.disabled = false;
|
||||
this.payNowButton.querySelector('svg').classList.add('hidden');
|
||||
|
Loading…
x
Reference in New Issue
Block a user