Git Product home page Git Product logo

payum-mollie's Introduction

Payum Mollie Extension Build Status StyleCI

The Payum extension. It provides Mollie payment integration.

Getting Started

Requirements

This library requires PHP 7.1 or higher.

Installing the extension

Install this extension as a Composer dependency by requiring it in a composer.json file:

composer require payhelper/payum-mollie

Register the Mollie Payum factory using PayumBuilder:

use Payum\Core\GatewayFactoryInterface;
use PayHelper\Payum\Mollie\MollieGatewayFactory;

$payumBuilder->addGatewayFactory('mollie', function(array $config, GatewayFactoryInterface $gatewayFactory) {
    return new MollieGatewayFactory($config, $gatewayFactory);
});

$payumBuilder->addGateway('mollie', [
    'factory' => 'mollie',
    'apiKey' => 'api123456', // change this
    'method' => 'creditcard', // one of directdebit, creditcard or directdebit_oneoff
]);

To work properly, Mollie gateway requires some additional fields being passed to the details of the payment. See the section below.

Supported methods

Check the documentation for each payment method to find out which fields are requred in order to make use of the methods.

Symfony integration

  1. PayumBundle installation

In order to use that extension with the Symfony, you will need to install PayumBundle first and configure it according to its documentation.

composer require payum/payum-bundle ^2.0
  1. Register Mollie Gateway Factory as a service
# app/config/services.yml

services:
    app.payum.mollie.factory:
        class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
        arguments: [PayHelper\Payum\Mollie\MollieGatewayFactory]
        tags:
            - { name: payum.gateway_factory_builder, factory: mollie }
  1. Configure the gateway
# app/config/config.yml

payum:
    gateways:
        mollie:
            factory: mollie
            apiKey: api123456 # change this
            method: creditcard # one of directdebit, creditcard or directdebit_oneoff
  1. Gateway usage

Retrieve it from the payum service:

$gateway = $this->get('payum')->getGeteway('mollie');

License

This library is licensed under the GNU GPLv3 license.

payum-mollie's People

Contributors

takeit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

payum-mollie's Issues

Create payment without specify any method

Hello,

It will be useful to create a payment without specify method it at Symfony level but use configuration defined in Mollie console.

Why do not let Mollie to decide what payment method the client want to use?
In case?
The payment method "creditcard" in your bundle could be replaced to a generic empty method.
The customer will be forward to Mollie checkout page and he could choice credit card method (if enabled) or any enabled payment method.

The only thing to do is remove the 'method' parameter in PayHelper\Payum\Mollie\Action\Api\CreateCaptureAction file and a very light refacto of PayHelper\Payum\Mollie\Action at the end of execute() method.

These modifications should help to implement a generic implementation of Mollie.

Thanks for your work :)

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.