no message

This commit is contained in:
2025-01-28 16:21:15 +01:00
parent 75c4fb698c
commit 0ae7576438
2 changed files with 3 additions and 23 deletions

View File

@@ -63,28 +63,8 @@ class Belevo_Bezahl_Modul extends IPSModule
});
function reservateAmount() {
paymentRequest.show();
paymentRequest.on("token", function(ev) {
// Send the token to your server to charge it!
var xhr = new XMLHttpRequest();
xhr.open("POST", "/api/");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(JSON.stringify({
"jsonrpc": "2.0",
"method": "SetValue",
"params": ["AmountIsReserved", true],
"id": 0
}));
xhr.onload = function() {
if (xhr.status === 200) {
ev.complete("success");
console.log("Reservierung erfolgreich.");
} else {
ev.complete("fail");
console.log("Reservierung fehlgeschlagen.");
}
};
});
// Show the payment request button
document.getElementById("payment-request-button").style.display = "block";
}
function getAmount() {

View File

@@ -6,7 +6,7 @@
"compatibility": {
"version": "7.1"
},
"version": "1.019",
"version": "1.020",
"build": 0,
"date": 0
}