WP Manifestindependent plugin directory
manifest / ecommerce / dokan-stripe-multiplay

Dokan Stripe Connect – Multi Payment Methods

This plugin enhances Dokan's Stripe payment integration with Stripe Payment Element, allowing buyers to use

by Mathes IT-Consulting · github.com/shaheen2013/dokan-stripe-multiplay · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/shaheen2013/dokan-stripe-multiplay/archive/refs/heads/main.zip

Declares an update source (https://mathesconsulting.de), so updates arrive through the plugin's own updater.

Readme

Dokan Stripe – Multi Payment Methods

Overview

This plugin enhances Dokan's Stripe payment integration with Stripe Payment Element, allowing buyers to use:

  • Credit & Debit Cards
  • Klarna
  • SEPA Debit
  • PayPal (via Stripe)
  • Apple Pay
  • Google Pay
  • TWINT (CHF)

It reuses Dokan Stripe credentials and vendor commission logic but provides a rich, multi-method checkout experience via the Payment Element.

This version is fully refactored using SOLID principles with a feature-based structure under src/ and a PSR-4 style autoloader.

Compatibility

Supports both Dokan Stripe Express (recommended, newer) and Dokan Stripe Connect (older) modules. Credentials are automatically fetched from whichever module is installed and configured (Express has priority).

No Dokan core files are modified.


Key design choices:

  • Feature modules (Payments, Webhooks, Admin, Settings) keep concerns separate.
  • Services handle business logic; controllers register hooks and validate requests.
  • Bootstrapping is centralized in src/Bootstrap/Plugin.php.
  • Autoloading is PSR-4 style from src/.

Key Features

  • Uses Stripe Payment Intents + Payment Element
  • Supports async payment methods (Klarna, SEPA, PayPal redirects)
  • Compatible with Dokan Pro vendor payouts via automatic transfers
  • Multi-vendor cart support
  • Per-site currency support (EUR / CHF / others)
  • Works with both Dokan Stripe modules
  • Upgrade-safe (no core overrides)

Requirements

  • WordPress 6.x+
  • WooCommerce 7.x+
  • Dokan Pro (latest) with either:
    • Dokan Stripe Express module (recommended), or
    • Dokan Stripe Connect module (legacy)
  • PHP 7.4+
  • Stripe PHP SDK (stripe/stripe-php)

Installation

  1. Upload the plugin ZIP via Plugins → Add New
  2. Activate Dokan Stripe – Multi Payment Methods
  3. Ensure Dokan Stripe Express or Dokan Stripe Connect module is installed and activated in Dokan
  4. Ensure at least one vendor has completed Stripe onboarding

Stripe Configuration

In your Stripe Dashboard:

  1. Enable Payment Element
  2. Enable required payment methods per country:
    • DE / FR: Cards, Klarna, SEPA, PayPal, Apple Pay, Google Pay
    • CH: Cards, TWINT, PayPal, Apple Pay, Google Pay
  3. Add webhook endpoints in StripeDevelopersWebhooks.

Per-Site Payment Methods (Configuration ID)

To show different payment methods for different sites (e.g. TWINT only for Switzerland, Klarna for Germany):

  1. Go to Stripe DashboardSettingsPayment methods.
  2. Scroll to "Payment method configurations" and create a new configuration (e.g. "German Market").
  3. Assign it to your connected accounts if necessary, or just the platform.
  4. Copy the Configuration ID (starts with pmc_...).
  5. Go to your WordPress Admin → settingsStripe Multi-Pay.
  6. Paste the ID into the Payment Method Configuration ID field.

Dokan Module Configuration

Configure credentials in your preferred Dokan Stripe module:

Dokan Stripe Express (Recommended)

  • WooCommerce SettingsPaymentsDokan Stripe Express
  • Configure test/live API keys: sandbox_publishable_key, sandbox_secret_key, publishable_key, secret_key
  • Enable sandbox mode if testing

Dokan Stripe Connect (Legacy)

  • WooCommerce SettingsPaymentsDokan Stripe Connect
  • Configure test/live API keys: test_publishable_key, test_secret_key, publishable_key, secret_key
  • Enable test mode if testing

For webhook secrets, configure them in this plugin's gateway settings per mode (test/live).


How It Works (Technical Summary)

  1. Checkout renders Stripe Payment Element.
  2. Plugin creates/updates a platform-level PaymentIntent.
  3. Buyer completes payment using selected method.
  4. Stripe webhook confirms payment.
  5. WooCommerce order is marked paid.
  6. Vendor payouts are created via Stripe Transfers (per vendor order).

Internally, the Payment Intent flow is handled by PaymentIntentController and PaymentIntentService, while transfer and reversal logic live in dedicated services under src/Payments and src/Webhooks.

Refunds trigger transfer reversals. Disputes move orders to on-hold until closed.

Vendor Payouts and Commission

  • Vendor earnings are calculated using Dokan commission APIs.
  • Transfers are created for each vendor order and grouped by parent order.
  • If a vendor has no Stripe account, a note is added and payout is skipped.
  • Optional: seller can pay Stripe processing fee (fee is prorated across transfers).

Order Status Logic

Payment Method Initial Status Final Status
Cards (includes Apple Pay & Google Pay) Processing Completed
PayPal Processing Completed
Klarna On-hold Completed
SEPA On-hold Completed
TWINT Processing Completed

Note: Apple Pay and Google Pay are processed as tokenized card payments and follow the card payment flow.

Webhooks are the source of truth.


Testing Checklist

See docs/testing-checklist.md.


Known Limitations

  • Requires Stripe PHP SDK to be available
  • Async payments depend on webhook delivery
  • Saved cards are only enabled when buyers opt in at checkout

Maintenance & Updates

  • No Dokan core overrides
  • No WooCommerce template overrides
  • Safe to update Dokan / WooCommerce
  • Stripe Payment Element is future-proof
  • SOLID, service-based architecture keeps future changes isolated

Support Notes

This plugin is intended for advanced Stripe Connect marketplaces.
Any customization should follow Stripe Payment Intent best practices.


License

Proprietary / Custom Development

Read the full README on GitHub →