mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update logic
This commit is contained in:
parent
3d67fe327b
commit
ec5b4243a2
@ -177,12 +177,13 @@
|
||||
const resource = await get3dsToken();
|
||||
console.log("3DS Token:", resource);
|
||||
|
||||
if(resource.status != "pre-authenticated" || resource.status != "authentication_not_supported")
|
||||
throw new Error('There was an issue authenticating this payment method.');
|
||||
|
||||
console.log("pre canvas");
|
||||
console.log(resource._3ds.token);
|
||||
|
||||
if (resource.status == "not_authenticated") {
|
||||
throw new Error('There was an issue authenticating this payment method.');
|
||||
}
|
||||
|
||||
var canvas = new cba.Canvas3ds('#widget-3dsecure', resource._3ds.token);
|
||||
canvas.load();
|
||||
|
||||
@ -195,9 +196,13 @@
|
||||
|
||||
document.getElementById('errors').textContent = `Sorry, your transaction could not be processed...\n\n${error}`;
|
||||
document.getElementById('errors').hidden = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
canvas.on("chargeAuthSuccess", function(data) {
|
||||
console.log(data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user