docroms / payment-bundle
Symfony Bundle 用于 Stripe 和 PayPal 集成
0.0.6
2016-07-07 12:50 UTC
Requires
- paypal/rest-api-sdk-php: 0.5.*
- stripe/stripe-php: 3.*
This package is not auto-updated.
Last update: 2024-09-14 18:58:47 UTC
README
请不要使用此 Bundle。^ ^
此 Bundle 是 Stripe 集成(以及 PayPal)的测试 Bundle
如何安装?
composer.json
添加此行
"docroms/payment-bundle": "dev-master",
config.json
添加以下行
payment
paypalMode: sandbox
paypalIdentifiant: Id-Paypal
paypalUserApi: User-Paypal
paypalUserPassApi : Pass-Paypal
paypalSignature : Signature-Paypal
paypalClientId : ClientId-Paypal
paypalSecret : Secret-Paypal
stripeTestSecretKey : secretKey-Stripe
stripeTestPublishableKey : publishableKey-Stripe
AppKernel.php
在 Bundles 数组中添加以下行
new \docroms\Bundle\PaymentBundle\PaymentBundle()
如何使用?
在您的控制器中
您可以直接初始化支付,如下所示
$genericPaid = $this->get('payment.paiement')
->init('stripe')
->getGeneratePay();