silvercommerce/payments-stripe-paymentintents

该软件包通过 omnipay 添加 Stripe 支付功能,并包括支付意向集成

安装: 227

依赖: 0

建议: 0

安全: 0

星级: 0

关注者: 2

分支: 1

公开问题: 1

类型:silverstripe-vendormodule

1.0.2 2023-05-11 13:32 UTC

This package is auto-updated.

Last update: 2024-09-11 19:49:03 UTC


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 网关表单中