Revert "Add authentication on payement"

This reverts commit 64e64373ce.
This commit is contained in:
2025-12-09 19:20:09 +01:00
parent 6565475095
commit 18a549be07
3 changed files with 42 additions and 5 deletions

View File

@@ -100,17 +100,15 @@
btnPay.addEventListener("click", async() => {
let token = document.getElementById("token-input").value;
let dataToken = {
token: token
};
let creds = JSON.parse(localStorage.getItem("creds"));
await fetch("/payment", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${creds.username}:${creds.password}`
"Content-Type": "application/json"
},
body: JSON.stringify(dataToken)
})

40
assets/pages/payment.html Normal file
View File

@@ -0,0 +1,40 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MASI 3DSecure</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header, footer {
background: #f4f4f4;
padding: 15px;
text-align: center;
}
main {
padding: 20px;
}
</style>
</head>
<body>
<main>
</main>
<script>
let btn = document.getElementById("btn-back");
console.log("Clicked");
btn.addEventListener("click", () => {
console.log("Clicked");
window.location.href = "/";
});
</script>
</body>
</html>