ruudk / payment-stripe-bundle
此包已被弃用,不再维护。未建议替换包。
一个提供对Stripe API访问的Symfony2 Bundle。基于JMSPaymentCoreBundle。
2.0.0
2016-07-19 08:35 UTC
Requires
- php: ^5.3.2|^7.0
- jms/payment-core-bundle: ~1.0
- omnipay/stripe: ~2.0
- psr/log: ~1.0
- symfony/framework-bundle: ~2.0|^3.0
This package is auto-updated.
Last update: 2022-02-01 12:35:18 UTC
README
一个提供对Stripe API访问的Symfony2 Bundle。基于JMSPaymentCoreBundle。
安装
步骤1:使用Composer安装包
php composer.phar require symfony/event-dispatcher:^2.8
php composer.phar require ruudk/payment-stripe-bundle
步骤2:启用bundle
在kernel中启用bundle
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Ruudk\Payment\StripeBundle\RuudkPaymentStripeBundle(), ); }
步骤3:配置
将以下内容添加到您的config.yml中
ruudk_payment_stripe: api_key: Your API key logger: true/false # Default true methods: - checkout
请确保为每个启用的支付方式在predefined_data中设置description
$form = $this->getFormFactory()->create('jms_choose_payment_method', null, array( 'amount' => $order->getAmount(), 'currency' => 'EUR', 'predefined_data' => array( 'stripe_checkout' => array( 'description' => 'My product', ), ), ));
有关更多信息,请参阅JMSPaymentCoreBundle文档。