summaryrefslogtreecommitdiff
path: root/views/mods/mod_paypalapi/overview_button.phtml
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-09-26 23:37:19 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-09-27 00:07:55 +0200
commit5a56decbd52c1e631e5a9ca75edfae89ab5b97fe (patch)
tree629e2878ffefa613563029e01578869eff41466f /views/mods/mod_paypalapi/overview_button.phtml
parentda288e56e56335d68827657c522ae0759fb8fbfe (diff)
PayPal PLUS: GiroPay entfernt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views/mods/mod_paypalapi/overview_button.phtml')
-rw-r--r--views/mods/mod_paypalapi/overview_button.phtml89
1 files changed, 0 insertions, 89 deletions
diff --git a/views/mods/mod_paypalapi/overview_button.phtml b/views/mods/mod_paypalapi/overview_button.phtml
deleted file mode 100644
index deef1cd..0000000
--- a/views/mods/mod_paypalapi/overview_button.phtml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
- declare(strict_types=1);
-
- /**
- * @author: daniel
- * @date: 13.06.24
- * @time: 14:48
- */
-
- namespace wpsg;
-
-?>
-
-<?php GiroPayPalAPI::getInstance()->integrateSDK(); ?>
-
-
-<div style="width:300px; float:right;">
- <div id="giropay-btn"></div>
-</div>
-
-<script>
-
- paypal.Buttons({
- fundingSource: paypal.FUNDING.GIROPAY,
- style: {
- label: "pay",
- },
- createOrder() {
-
- const form = document.getElementById('wpsg_form');
-
- if (form.checkValidity()) {
-
- return fetch("<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCreateOrderFromSession', [ ], true); ?>", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: { }
- })
- .then((response) => response.json())
- .then((order) => order.id);
-
- } else form.reportValidity();
-
- },
- onApprove(data) {
-
- return fetch("<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayApproveOrder', [], true); ?>", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- orderID: data.orderID
- })
- })
- .then((response) => response.json())
- .then((orderData) => {
-
- location.href = orderData.order_done_url;
-
- // Successful capture! For dev/demo purposes:
- // console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
-
- // const transaction = orderData.order_paypal.purchase_units[0].payments.captures[0];
-
- //console.log('Transaction Status:', transaction.status);
- //console.log('Transaction ID:', transaction.id);
-
- });
-
- },
- onCancel(data, actions) {
-
- console.log(`Order Canceled - ID: ${data.orderID}`);
-
- location.href = '<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCancelOrder', [], true); ?>';
-
- },
- onError(err) {
-
- <?php if (\wpsg_ShopController::getShop()->get_option('wpsg_debugModus') === "1") { ?>console.error(err);<?php } ?>
-
- }
- }).render("#giropay-btn");
-
-</script> \ No newline at end of file