承接 shivella/ideal-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Latest Stable Version License Total Downloads Coverage Status Scrutinizer Code Quality

Installation

Installation is a quick 3 step process:

  1. Download ideal-bundle using composer
  2. Enable the Bundle in AppKernel.php
  3. 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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-04