Adds stripe customer and creditcard saving to silvershop
Installs: 1 996
Open Issues: 1
- omnipay/stripe: ^3.0
- silvershop/core: ^3.0
- silverstripe/cms: ^4
- silverstripe/vendor-plugin: ^1
- suilven/silverstripe-track-member: ~1.0
This package is auto-updated.
Last update: 2023-03-09 07:05:40 UTC
Based on Mark Guinn's SS3 version, extended with saving of the token to the Member object for later use.
This module is still work in progress. PRs welcome!
- SilverStripe CMS 4.*
- SilverShop Core 3.*
- Track members 1.*
- Omnipay Stripe 3.*
uses Stripe.js v3
composer require innoweb/silverstripe-silvershop-stripe
Create a file at
app/_config/payment.yml that looks something like the following:
--- Name: payment --- SilverStripe\Omnipay\Model\Payment: allowed_gateways: - 'Stripe' SilverStripe\Omnipay\GatewayInfo: Stripe: parameters: apiKey: SECRET-KEY-FOR-YOUR-TEST-ACCOUNT publishableKey: PUBLISHABLE-KEY-FOR-TEST-ACCOUNT --- Only: environment: 'live' --- SilverStripe\Omnipay\GatewayInfo: Stripe: parameters: apiKey: SECRET-KEY-FOR-YOUR-LIVE-ACCOUNT publishableKey: PUBLISHABLE-KEY-FOR-LIVE-ACCOUNT
The module creates Stripe customers and cards when a payment is processed. To disable the use of previously stored cards in the checkout process, add the following to your config:
--- Name: app-stripe-config After: silvershop-stripe-config --- Innoweb\SilvershopStripe\Checkout\Components\StripeOnsitePayment: enable_saved_cards: false
This will hide the field to select previsouly stored cards in th epayment form. The card tokens will still be stored in the background in order to be able to process refunds and future manual payments.
BSD 3-Clause License, see License