Stripe Driver (PaymentsStripe)
PaymentsStripe (trk/processwire-payments-stripe, v0.1.0) is the official Stripe gateway driver for Payments. It registers lazily via 'paymentsDriver' => true and Payments::registerDrivers with driver key stripe.
Repository: github.com/trk/PaymentsStripe
Installation
Section titled “Installation”composer require trk/processwire-payments-stripephp vendor/bin/wire module:install PaymentsStripe --jsonOnce installed, open Setup -> Payments -> Gateways and click + Set Up Gateway on Stripe.
Configuration Schema (SecretBox)
Section titled “Configuration Schema (SecretBox)”| Setting Key | Required | Recommended Storage | Purpose |
|---|---|---|---|
secret_key |
Yes | $env:STRIPE_SECRET_KEY |
Stripe secret API key (sk_test_... or sk_live_...). |
publishable_key |
Optional | Plaintext or $env: |
Publishable key (pk_test_... / pk_live_...) for onsite Elements/Checkout. |
webhook_secret |
Yes (Live) | $env:STRIPE_WEBHOOK_SECRET |
Webhook signing secret (whsec_...). Supports comma-separated or list secrets for zero-downtime rotation. |
capture_method |
Optional | automatic or manual |
Controls immediate vs. two-step PaymentIntent capture. |
webhook_tolerance_seconds |
Optional | 300 (default) |
Replay window enforced by StripeSignatureVerifier. |
api_base_url |
Optional | https://api.stripe.com/v1 |
HTTPS override without embedded credentials (StripeHttpClient). |
Capabilities & Implemented Interfaces
Section titled “Capabilities & Implemented Interfaces”Totoglu\PaymentsStripe\StripeGateway implements 9 interfaces: PaymentGatewayInterface, SavedSourceGatewayInterface, SubscriptionGatewayInterface, QuantitySubscriptionGatewayInterface, MeteredSubscriptionGatewayInterface, MarketplaceGatewayInterface, WebhookGatewayInterface, InvoiceGatewayInterface, and TransactionStatusGatewayInterface.
- Supported: Onsite, Offsite, Overlay Checkout, Saved Sources (
createSetupIntent,createSource,deleteSource), Partial Capture, Partial Refund, Void, Subscriptions (plan switch, seat quantity,pause_collection, resume, cancel, reactivate), Customer Billing Portal, Zero-Amount setup intents, Metered Billing (POST /v1/billing/meter_events), Stripe Connect Marketplace (POST /v1/accounts,POST /v1/transfers,transfer_data/application_fee_amount/transfer_group), Invoice & Receipt fetching (fetchInvoicefromin_...,cs_...,pi_...,ch_...), and live reconciliation (fetchTransactionStatus). - Currency Minor Units:
toStripeMinorAmount()andfromStripeMinorAmount()automatically translate betweenCurrencyMoneydecimals and Stripe zero-decimal or 2-decimal currency exponents.
Webhook Verification (Stripe-Signature)
Section titled “Webhook Verification (Stripe-Signature)”Register https://your-site.example/_payments/webhook/{gatewayHandle} (print via php vendor/bin/wire payments:webhook:url <handle> --json) in your Stripe Dashboard. StripeSignatureVerifier parses t=<unix_ts>,v1=<hex_sig>, checks $toleranceSeconds, and verifies hash_hmac('sha256', "{$t}.{$rawBody}", $secret) with constant-time hash_equals.