From ad4b3c31efd2b8450bd62ca8e2193e9584aeb879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Tue, 28 Jan 2025 16:14:40 +0100 Subject: [PATCH] d --- Belevo_Bezahl_Modul/module.php | 149 +++++++++++++++++---------------- library.json | 2 +- 2 files changed, 76 insertions(+), 75 deletions(-) diff --git a/Belevo_Bezahl_Modul/module.php b/Belevo_Bezahl_Modul/module.php index 1949486..85b6ecf 100644 --- a/Belevo_Bezahl_Modul/module.php +++ b/Belevo_Bezahl_Modul/module.php @@ -29,84 +29,85 @@ class Belevo_Bezahl_Modul extends IPSModule $apiKey = "pk_test_51Qkr79LJAcsNrpivA90lt7ULEzyXKR8l0pAqTBgfeuAIWlsLS4A3BdIBITc9UooFANbImvlJQ2F2jOZ0X5j8GI7Q00hNNasvQm"; // Test-API-Schlüssel $html = ' - - - - - - -
- + + + + +
+ - - '; + function getAmount() { + var xhr = new XMLHttpRequest(); + xhr.open("POST", "/api/"); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.send(JSON.stringify({ + "jsonrpc": "2.0", + "method": "SetValue", + "params": [' . $this->GetIDForIdent("AmountIsReserved") . ', false], + "id": 0 + })); + xhr.onload = function() { + if (xhr.status === 200) { + console.log("Abzug erfolgreich."); + } else { + console.log("Abzug fehlgeschlagen."); + } + }; + } + + +'; SetValue($this->ReadPropertyInteger("HTMLBox"), $html); // Baut das HTML auf } diff --git a/library.json b/library.json index 53579ff..7f5c64e 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.017", + "version": "1.018", "build": 0, "date": 0 } \ No newline at end of file