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