diff --git a/resources/views/portal/ninja2020/gateways/powerboard/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/powerboard/credit_card/pay.blade.php index cdf1c2497ced..0e4cf04ffa92 100644 --- a/resources/views/portal/ninja2020/gateways/powerboard/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/powerboard/credit_card/pay.blade.php @@ -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);