no message
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compatibility": {
|
||||
"version": "7.1"
|
||||
},
|
||||
"version": "1.019",
|
||||
"version": "1.020",
|
||||
"build": 0,
|
||||
"date": 0
|
||||
}
|
||||
Reference in New Issue
Block a user