This commit is contained in:
dh
2025-01-28 16:14:40 +01:00
parent 419c987044
commit ad4b3c31ef
2 changed files with 76 additions and 75 deletions
+3 -2
View File
@@ -37,7 +37,7 @@ class Belevo_Bezahl_Modul extends IPSModule
<button onclick="getAmount()">Get Amount</button> <button onclick="getAmount()">Get Amount</button>
<div id="payment-request-button"></div> <div id="payment-request-button"></div>
<script> <script>
var stripe = Stripe("' . $apiKey . '"); var stripe = Stripe("pk_test_51Qkr79LJAcsNrpivA90lt7ULEzyXKR8l0pAqTBgfeuAIWlsLS4A3BdIBITc9UooFANbImvlJQ2F2jOZ0X5j8GI7Q00hNNasvQm");
var elements = stripe.elements(); var elements = stripe.elements();
var paymentRequest = stripe.paymentRequest({ var paymentRequest = stripe.paymentRequest({
country: "CH", country: "CH",
@@ -63,6 +63,7 @@ class Belevo_Bezahl_Modul extends IPSModule
}); });
function reservateAmount() { function reservateAmount() {
paymentRequest.show();
paymentRequest.on("token", function(ev) { paymentRequest.on("token", function(ev) {
// Send the token to your server to charge it! // Send the token to your server to charge it!
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
@@ -106,7 +107,7 @@ class Belevo_Bezahl_Modul extends IPSModule
} }
</script> </script>
</body> </body>
</html>'; </html>';
SetValue($this->ReadPropertyInteger("HTMLBox"), $html); // Baut das HTML auf SetValue($this->ReadPropertyInteger("HTMLBox"), $html); // Baut das HTML auf
} }
+1 -1
View File
@@ -6,7 +6,7 @@
"compatibility": { "compatibility": {
"version": "7.1" "version": "7.1"
}, },
"version": "1.017", "version": "1.018",
"build": 0, "build": 0,
"date": 0 "date": 0
} }