Plugin Adapters

Ready-to-Adapt Plugins

Transform existing Stripe plugins into Mandala-compatible payment solutions in under 1 hour. All major e-commerce platforms supported with minimal code changes.

7+

Platforms Supported

30-70

Lines of Code

<1h

Time per Platform

100%

Open Source

Live Examples

Experience It Live

Test real integrations with actual e-commerce platforms. No setup required.

WooCommerce Store

WordPress + WooCommerce with Stripe plugin
using Mandala JavaScript adapter

Open Demo How to Patch

Magento 2 Store

Adobe Commerce / Magento 2
with official Stripe module adapted

Open Demo How to Patch
Test Card: 4539 9999 9999 9993

3 Simple Steps to Adapt Any Plugin

The same pattern works for all platforms

1

Override API Base

Point Stripe SDK to Mandala endpoint instead of api.stripe.com

api_base =
'api.payglobe.it/mandala/v1'
2

Adapt Webhook HMAC

Accept X-PayGlobe-Signature header alongside Stripe-Signature

X-PayGlobe-Signature
|| Stripe-Signature
3

Server-Only Flow

Disable Stripe Elements, use redirect_to_url for hosted payment page

next_action.
redirect_to_url

Supported Platforms

Click on each platform to see adaptation details

WooCommerce Stripe Gateway v10.x

Official Stripe plugin for WooCommerce - JavaScript Adapter Method

Live Demo Easy • 2 files
GitHub Repository • Open Source (GPLv3) Tested v10.1.0
Show adaptation guide
✅ Recommended Method: Use the JavaScript Adapter to intercept Stripe.js calls - no PHP modifications needed!
Step 1: Add PayGlobe Scripts to your theme

Add this to your theme's functions.php or use a plugin like "Insert Headers and Footers":

// Add to functions.php add_action('wp_enqueue_scripts', function() { if (is_checkout()) { // Load PayGlobe SDK first wp_enqueue_script( 'payglobe-sdk', 'https://api.payglobe.it/mandala/js/payglobe.js', [], '1.0.0', false // Load in <head> ); // Load Stripe Adapter (replaces Stripe.js) wp_enqueue_script( 'payglobe-stripe-adapter', 'https://api.payglobe.it/mandala/js/payglobe-stripe-adapter.js', ['payglobe-sdk'], '2.6.0', false // Load in <head> ); // Dequeue original Stripe.js wp_dequeue_script('stripe'); wp_deregister_script('stripe'); } }, 100);
Step 2: Override API Base URL (PHP)

Modify includes/class-wc-stripe-api.php to point to Mandala:

// File: includes/class-wc-stripe-api.php (around line 100) public static function get_client() { return new \Stripe\StripeClient([ 'api_key' => self::get_secret_key(), 'stripe_version' => '2023-10-16', 'api_base' => 'https://api.payglobe.it/mandala/v1', // ← Add this line ]); }
Step 3: Configure WooCommerce Settings

In WooCommerce → Settings → Payments → Stripe:

1. API Keys

Use your Mandala/PayGlobe keys (format: pk_test_... / sk_test_...)

2. Payment Request Buttons

Disable Apple Pay / Google Pay (not supported via Mandala)

3. Inline Credit Card Form

Can be enabled - adapter shows placeholder, then opens modal on "Place Order"

How It Works
Frontend Flow:
  1. Customer fills checkout form
  2. Clicks "Place Order"
  3. WooCommerce creates PaymentIntent via Mandala API
  4. Adapter intercepts stripe.confirmPayment()
  5. Modal opens with secure payment form
  6. After payment → redirect to order-received
HTTP Sites (no HTTPS):
  1. Payment gateway requires HTTPS for iframe (CSP)
  2. Adapter auto-detects HTTP protocol
  3. Falls back to full-page redirect
  4. After payment → redirect back to WooCommerce
⚠️ Important: For production, use HTTPS. The redirect fallback works but provides a less seamless UX than the modal.
Webhook Configuration (Optional)

For order status updates via webhook:

// File: includes/class-wc-stripe-webhook-handler.php protected function verify_webhook_signature($body) { // Accept both Mandala and Stripe signature headers $signature = $_SERVER['HTTP_X_PAYGLOBE_SIGNATURE'] ?? $_SERVER['HTTP_STRIPE_SIGNATURE'] ?? ''; // HMAC-SHA256 verification $expected = base64_encode(hash_hmac('sha256', $body, $this->secret, true)); return hash_equals($expected, $signature); }
Step 4: Order Completion Handler (Required)

Add this PHP code to handle redirect after payment. WooCommerce needs to complete the order when returning from the payment gateway:

// Add to functions.php - Handles redirect from Mandala/PayGlobe add_action('template_redirect', function() { // Only process on checkout page with payment_intent params if (!is_checkout() || !isset($_GET['payment_intent']) || !isset($_GET['redirect_status'])) { return; } // Only handle successful payments if ($_GET['redirect_status'] !== 'succeeded') { wc_add_notice('Payment failed. Please try again.', 'error'); return; } $payment_intent_id = sanitize_text_field($_GET['payment_intent']); // Find order by payment_intent meta $orders = wc_get_orders([ 'meta_key' => '_stripe_intent_id', 'meta_value' => $payment_intent_id, 'limit' => 1, ]); if (empty($orders)) { // Try alternative meta key $orders = wc_get_orders([ 'meta_key' => '_payment_intent_id', 'meta_value' => $payment_intent_id, 'limit' => 1, ]); } if (empty($orders)) { error_log('[PayGlobe] Order not found for PI: ' . $payment_intent_id); return; } $order = $orders[0]; // Only process pending/failed orders if (!in_array($order->get_status(), ['pending', 'failed'])) { // Order already processed - redirect to thank you page wp_redirect($order->get_checkout_order_received_url()); exit; } // Mark order as processing/completed $order->payment_complete($payment_intent_id); $order->add_order_note( sprintf('Payment completed via PayGlobe Mandala (PI: %s)', $payment_intent_id) ); // Clear cart WC()->cart->empty_cart(); // Redirect to thank you page wp_redirect($order->get_checkout_order_received_url()); exit; }, 5); // Priority 5 = early execution
⚠️ Why is this needed?
When using redirect mode (HTTP sites or external payment page), WooCommerce loses the session context. This handler intercepts the return redirect and completes the order based on the payment_intent parameter.
💡 Testing: Use pk_test_... keys and test cards. The adapter logs debug info to browser console (F12).

PrestaShop Stripe Official

Official Stripe module for PrestaShop

Easy • 25-50 lines
GitHub Repository • Open Source (AFL 3.0)
Show adaptation guide
Files to Modify:
classes/StripeClient.php

Client initialization point

controllers/front/webhook.php

Webhook handler

// File: classes/StripeClient.php protected function initClient() { \Stripe\Stripe::setApiKey($this->secret_key); \Stripe\Stripe::setApiBase('https://api.payglobe.it/mandala/v1'); // ← Add \Stripe\Stripe::setApiVersion('2023-10-16'); }

Magento 2 Stripe Connector

Stripe payment integration for Magento 2

Live Demo Medium • 40-70 lines
GitHub Repository • Open Source
Show adaptation guide
Files to Modify:
Helper/Api.php

Stripe client helper

Observer/WebhookObserver.php

Webhook handler observer

// File: Helper/Api.php public function getClient() { \Stripe\Stripe::setApiKey($this->getSecretKey()); \Stripe\Stripe::setApiBase('https://api.payglobe.it/mandala/v1'); return new \Stripe\StripeClient($this->getSecretKey()); }
Other Supported Platforms
OpenCart Easy • 20-40 lines

Multiple OSS modules available (MIT/GPL)

WP Simple Pay (Lite) Easy • 20-40 lines

WordPress.org official lite version

GiveWP Stripe Add-on Easy • 30-50 lines

GPLv3 donation plugin

Gravity Forms Stripe Medium • 30-50 lines

Commercial add-on (code available to customers)

Universal Code Pattern

Works for all platforms - just copy and adapt

PHP (Stripe SDK v10+)
// 1. Initialize Stripe Client with Mandala endpoint $stripe = new \Stripe\StripeClient([ 'api_key' => 'sk_test_PayGlobe_...', 'stripe_version' => '2023-10-16', 'api_base' => 'https://api.payglobe.it/mandala/v1', // ← Key change ]); // 2. Webhook signature verification (accept both headers) function verify_webhook($payload, $secret) { $signature = $_SERVER['HTTP_X_PAYGLOBE_SIGNATURE'] ?? $_SERVER['HTTP_STRIPE_SIGNATURE'] ?? null; if (!$signature) { throw new Exception('Missing signature header'); } // Calculate HMAC-SHA256 on raw body $expected = base64_encode(hash_hmac('sha256', $payload, $secret, true)); if (!hash_equals($expected, $signature)) { throw new Exception('Invalid signature'); } return true; } // 3. Server-only flow (disable Elements, use redirect) $paymentIntent = $stripe->paymentIntents->create([ 'amount' => 5000, // cents 'currency' => 'eur', ]); // Confirm and get redirect URL $confirmed = $stripe->paymentIntents->confirm($paymentIntent->id); if ($confirmed->next_action && $confirmed->next_action->redirect_to_url) { $redirectUrl = $confirmed->next_action->redirect_to_url->url; // Redirect customer to Mandala hosted page header("Location: $redirectUrl"); exit; }

Ready to Adapt Your Plugin?

Join the community and contribute your adapter

Need Help?

Our team can help you adapt your plugin or build a custom integration.

support@payglobe.it
Legal Disclaimer

Stripe is a registered trademark of Stripe, Inc. WooCommerce is a registered trademark of Automattic Inc. PrestaShop is a registered trademark of PrestaShop SA. Magento and Adobe Commerce are registered trademarks of Adobe Inc. PayGlobe Mandala is not affiliated with, endorsed by, or sponsored by any of these companies. All references to third-party trademarks are for compatibility and integration purposes only. This adapter provides API compatibility and does not claim any affiliation with the mentioned brands.