shivella/ideal-bundle
最新稳定版本:1.0.6
Composer 安装命令:
composer require shivella/ideal-bundle
包简介
Symfony iDeal Bundle
README 文档
README
Please consider using: https://github.com/ruudk/PaymentMollieBundle
Mollie iDeal bundle
This Symfony3 bundle adds support for iDEAL payments by Mollie. It is using Mollie-php-api. A Mollie account is required.
For more information see Mollie
Installation
Installation is a quick 3 step process:
- Download ideal-bundle using composer
- Enable the Bundle in AppKernel.php
- Configure your Mollie credentials
Step 1: Download ideal-bundle using composer
Add UsoftIDealBundle by running the command:
$ composer require shivella/ideal-bundle
Step 2: Enable the Bundle in AppKernel.php
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Usoft\IDealBundle\UsoftIDealBundle(), ); }
Step 3: Configure Mollie credentials
# app/config/config.yml # ideal Mollie usoft_i_deal: mollie: key: secret_mollie_key description: "Mollie payment"
Usage in Controller
<?php // Acme/Bundle/OrderController.php public function paymentAction(Request $request) { $form = $this->createForm(IdealType::class); $form->handleRequest($request); if ($form->isValid()) { $mollie = $this->get('mollie'); $bank = new Bank($form->get('bank')->getData()); $amount = (float) 120.99; return $mollie->execute($bank, $amount, 'route_to_confirm_action'); } return $this->render('payment.html.twig', ['form' => $form->createView()]); } /** * @Route("/order/confirm", name="route_to_confirm_action") * * @param Request $request */ public function confirmAction(Request $request) { if ($this->get('mollie')->confirm($request)) { // handle order.... } else { // Something went wrong... } }
统计信息
- 总下载量: 2.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-04