mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Square payments
This commit is contained in:
parent
82a0a311cd
commit
5c8976a50f
@ -39,11 +39,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', async function () {
|
document.addEventListener('DOMContentLoaded', async function () {
|
||||||
|
|
||||||
if (!window.Square) {
|
if (!window.Square) {
|
||||||
throw new Error('Square.js failed to load properly');
|
throw new Error('Square.js failed to load properly');
|
||||||
}
|
}
|
||||||
|
|
||||||
const payments = window.Square.payments(appId, locationId);
|
const payments = window.Square.payments(appId, locationId);
|
||||||
let card;
|
let card;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
card = await initializeCard(payments);
|
card = await initializeCard(payments);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user