1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

fixes for stripe cc console errors

This commit is contained in:
David Bomba 2023-03-12 15:51:26 +11:00
parent 271c19d4c6
commit 9f8c5ad1be
5 changed files with 240 additions and 214 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
"/js/clients/payments/checkout-credit-card.js": "/js/clients/payments/checkout-credit-card.js?id=4bd34a0b160f6f29b3096d870ac4d308",
"/js/clients/quotes/action-selectors.js": "/js/clients/quotes/action-selectors.js?id=0af9e4910d17cd5c67ceae955488b950",
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=2cb18f2df99d0eca47fa34f1d652c34f",
"/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=809de47258a681f0ffebe787dd6a9a93",
"/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=cdcc94a3abdd08dfd981870eaa9d2a85",
"/js/setup/setup.js": "/js/setup/setup.js?id=27560b012f166f8b9417ced2188aab70",
"/js/clients/payments/card-js.min.js": "/js/clients/payments/card-js.min.js?id=8ce33c3deae058ad314fb8357e5be63b",
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=be5307abc990bb44f2f92628103b1d98",

View File

@ -198,6 +198,8 @@ class StripeCreditCard {
document
.getElementById('pay-now')
.addEventListener('click', () => {
try {
let tokenInput = document.querySelector('input[name=token]');
if (tokenInput.value) {
@ -205,6 +207,10 @@ class StripeCreditCard {
}
return this.completePaymentWithoutToken();
}catch(error){
console.log(error.message);
}
});
}
}

View File

@ -20,15 +20,35 @@ describe('Test Invoices', () => {
cy.get('input[name=client_address_line_1]').clear().type('5 Wallaby Way');
cy.get('input[name=client_city]').clear().type('Perth');
cy.get('input[name=client_state]').clear().type('WA');
cy.get('select#client_country_id]').select("840");
cy.get('#client_country').select("840");
cy.get('input[name=client_shipping_address_line_1]').clear().type('5 Wallaby Way');
cy.get('input[name=client_shipping_city]').clear().type('Perth');
cy.get('input[name=client_shipping_state]').clear().type('WA');
cy.get('select#client_shipping_country_id]').select("840");
cy.get('#client_country').select("840");
cy.contains('Continue').click();
cy.get('#cardholder-name').type('Cypress Test');
// cy.contains('Card number').type('4242424242424242');
// cy.contains('MM / YY').type('1024');
// cy.contains('CVC').type('100');
cy.get("iframe").then($iframe => {
const $body = $iframe.contents().find("body");
cy.wrap($body)
.find("input[placeholder='Card number']")
.type("4242424242424242");
cy.wrap($body)
.find("input[placeholder='MM / YY']")
.type("1225");
cy.wrap($body)
.find("input[placeholder='CVC']")
.type("100");
});
cy.get('#pay-now').click();
});

File diff suppressed because it is too large Load Diff