silvercommerce / payments-stripe-paymentintents
该软件包通过 omnipay 添加 Stripe 支付功能,并包括支付意向集成
1.0.2
2023-05-11 13:32 UTC
Requires
- omnipay/stripe: ^3.0
- silvercommerce/checkout: ^1.1
- silvercommerce/orders-admin: ^1.3
- silvercommerce/settings: ^1.0
- silverstripe/framework: ^4.2
README
模块通过集成支付表单和支付意向,将 Stripe 支付添加到 SilverCommerce 网站中(使用 omnipay stripe 网关)。
安装
通过 composer 安装
composer require silvercommerce/payments-stripe-paymentintents
配置
按照任何 SilverStripe omnipay 模块的方式配置
payments.yml
---
Name: paymentconfig
---
SilverStripe\Omnipay\Model\Payment:
allowed_gateways:
- 'Stripe_PaymentIntents'
SilverStripe\Omnipay\GatewayInfo:
PayPal_Express:
parameters:
apikey: sk_live_xxxxxxxxx
publishableKey: pk_live_xxxxxxxxx
# Config for test environments
---
Except:
environment: 'live'
---
SilverStripe\Omnipay\GatewayInfo:
Stripe_PaymentIntents:
parameters:
apikey: sk_test_xxxxxx
publishableKey: pk_test_xxxxxx
支付意向
为了符合欧盟 SCA 规则,该模块使用支付意向 API 在完成购买之前生成支付意向。
这意味着支付记录在数据库中也会有对应的支付意向 ID。
处理生成支付意向的 JavaScript 会自动添加,并将支付意向 ID 添加到 omnipay 网关表单中