diff --git a/Belevo_Bezahl_Modul/module.php b/Belevo_Bezahl_Modul/module.php index 5c65863..61500f7 100644 --- a/Belevo_Bezahl_Modul/module.php +++ b/Belevo_Bezahl_Modul/module.php @@ -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() { diff --git a/library.json b/library.json index c470ee0..09f9322 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.019", + "version": "1.020", "build": 0, "date": 0 } \ No newline at end of file