itpeopleperformance/kj-payment-stripe-bundle

提供访问 Stripe API 的支付包

dev-master 2023-11-30 00:44 UTC

This package is not auto-updated.

Last update: 2024-09-27 02:21:30 UTC


README

提供访问 Stripe API 的支付包

安装

composer

composer require sopinet/kj-payment-stripe-bundle

AppKernel

添加到 AppKernel

    new KJ\Payment\StripeBundle\KJPaymentStripeBundle(),

config.yml

// app/config/config.yml
kj_payment_stripe:
    api_key: sk_test_blablabla # ApiKey from Stripe
    api_version: "2016-07-06" # Last version from Stripe

在 JMSPaymentBundle 中的配置

您需要将 "stripe_card_credit" 方法添加到您的 JMSPaymentBundle 表单中

可选:为信用卡配置表单

您可以使用默认的完整信用卡表单,包括地址选项和其他内容。

但您也可以配置另一个最小化表单,您可以覆盖此参数

payment.form.stripe_credit_card_type.class: KJ\Payment\StripeBundle\Form\StripeCreditCardMinimumType

最后,您也可以创建自己的表单