Fixes for CBA Powerboard

This commit is contained in:
David Bomba 2024-09-24 17:35:02 +10:00
parent 3b8aef5e58
commit 4ca2cc1cf9
3 changed files with 3 additions and 5 deletions

View File

@ -10,4 +10,4 @@ import{i,w as u}from"./wait-8f4ae121.js";/**
${e}`,document.getElementById("errors").hidden=!1,a=!0,d()}}async function g(){const n={name:navigator.userAgent.substring(0,100),java_enabled:navigator.javaEnabled()?"true":"false",language:navigator.language||navigator.userLanguage,screen_height:window.screen.height.toString(),screen_width:window.screen.width.toString(),time_zone:(new Date().getTimezoneOffset()*-1).toString(),color_depth:window.screen.colorDepth.toString()};document.querySelector('input[name="browser_details"]').value=JSON.stringify(n);const e=JSON.stringify(Object.fromEntries(new FormData(document.getElementById("server-response")))),o=document.querySelector("meta[name=payments_route]");try{const t=await fetch(o.content,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Accept:"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:e});return t.ok?await t.json():await t.json().then(r=>{throw new Error(r.message??"Unknown error.")})}catch(t){document.getElementById("errors").textContent=`Sorry, your transaction could not be processed...
${t.message}`,document.getElementById("errors").hidden=!1,console.error("Fetch error:",t),a=!0,d()}}i()?d():u("#powerboard-credit-card-payment").then(()=>d());
${t}`,document.getElementById("errors").hidden=!1,a=!0,d()}}i()?d():u("#powerboard-credit-card-payment").then(()=>d());

View File

@ -158,7 +158,7 @@
"src": "resources/js/clients/payments/paytrace-credit-card.js"
},
"resources/js/clients/payments/powerboard-credit-card.js": {
"file": "assets/powerboard-credit-card-bb946fa4.js",
"file": "assets/powerboard-credit-card-0495858a.js",
"imports": [
"_wait-8f4ae121.js"
],

View File

@ -285,11 +285,9 @@ async function get3dsToken() {
} catch (error) {
document.getElementById(
'errors'
).textContent = `Sorry, your transaction could not be processed...\n\n${error.message}`;
).textContent = `Sorry, your transaction could not be processed...\n\n${error}`;
document.getElementById('errors').hidden = false;
console.error('Fetch error:', error); // Log error for debugging
focusCreditCard = true;
pay();