no message
This commit is contained in:
@@ -63,28 +63,8 @@ class Belevo_Bezahl_Modul extends IPSModule
|
|||||||
});
|
});
|
||||||
|
|
||||||
function reservateAmount() {
|
function reservateAmount() {
|
||||||
paymentRequest.show();
|
// Show the payment request button
|
||||||
paymentRequest.on("token", function(ev) {
|
document.getElementById("payment-request-button").style.display = "block";
|
||||||
// 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.");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAmount() {
|
function getAmount() {
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "7.1"
|
"version": "7.1"
|
||||||
},
|
},
|
||||||
"version": "1.019",
|
"version": "1.020",
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"date": 0
|
"date": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user