Logging for wepay

This commit is contained in:
David Bomba 2022-10-01 11:44:07 +10:00
parent 9c90b96dea
commit 0370a4eb16
3 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -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=8745ab4958f440cdae10bf4d3586b7bb",
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=c0ee01b19ede597c4529cf72f57ace85",
"/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",

View File

@ -74,13 +74,13 @@ class WePayCreditCard {
cardButton.querySelector('span').classList.add('hidden');
var client_address = {};
client_address.country = document.querySelector(['meta[name=country_code']).content;
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;
client_address['postal_code'] = document.querySelector(['meta[name=client-postal-code']).content;
}
console.log(JSON.stringify(client_address));
console.log(client_address);
WePay.credit_card.create({
client_id: document.querySelector('meta[name=wepay-client-id]').content,
@ -90,7 +90,7 @@ 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: client_address
}, (data) => {
if (data.error) {
cardButton = document.getElementById('card_button');
@ -126,13 +126,13 @@ class WePayCreditCard {
}
var client_address = {};
client_address.country = document.querySelector(['meta[name=country_code']).content;
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;
client_address['postal_code'] = document.querySelector(['meta[name=client-postal-code']).content;
}
console.log(JSON.stringify(client_address));
console.log(client_address);
WePay.credit_card.create({
@ -143,7 +143,7 @@ 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: client_address
}, (data) => {
if (data.error) {
this.payNowButton.disabled = false;