2017 © Pedro Peláez
 

library omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

image

digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  • Friday, March 9, 2018
  • by Digitickets
  • Repository
  • 3 Watchers
  • 4 Stars
  • 9,785 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 23 Versions
  • 15 % Grown

The README.md

Omnipay: GoCardlessV2

Go Cardless driver for the Omnipay PHP payment processing library using the GoCardless v2 API, (*1)

Build Status Coverage Status Latest Stable Version Total Downloads, (*2)

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.5+. This package implements GoCardless support for Omnipay., (*3)

Installation

Omnipay is installed via Composer. To install, simply add it to your composer.json file:, (*4)

composer require digitickets/gocardlessv2:"^0"

Basic Usage

The following gateways are provided by this package:, (*5)

  • GoCardless Pro - Release Candidate
  • GoCardless Pro (JS Flow) - Release Candidate
  • GoCardless Redirect Flow - Alpha Release

Please let us know if you are using these release candidates in a production envrionment and we will make a formal release - until that time we may push breaking changes!, (*6)

Don't know which gateway to use? * If you are using GoCardless' own payment screens on their site you want the RedirectGateway. * If you are using the GoCardless Javascript to process the card details and return a token then the JSFlowGateway is for you. * If you are handling the bank account details on your own server (accepting the highest level of PCI responsibility) then the Pro Gateway is for you., (*7)

All the gateways wrap a common core with a lot of shared methods but they differ in mechanism for creating customers, bank accounts and mandates. Redirect returns you a mandate with customer / bank account created behind the scenes. JSFlow returns you a bank account token so you can create a customer, bank account and mandate yourself without handling the bank account details. Pro requires you to submit all the data yourself in individual steps. Creating a subscription or taking a single payment is common to all., (*8)

This is still in Development - Only the JS Flow gateway is currently stable., (*9)

You need to set your access_token. Setting testMode to true will use the sandbox environment., (*10)

This gateway supports single payments or scheduled subscriptions via bank mandate only. For more details about what this gateway supports please consult the documentation, (*11)

For general usage instructions, please see the main Omnipay repository., (*12)

Driver specific usage

This driver supports multiple methods of implementation available via GoCardless. Please consult their documentation to confirm which methods are correct for your situation. Not all methods are applicable to every route. This driver does not provide access to the list methods - data may only be retrieved by primary key., (*13)

Create customer

$customer = $gateway->createCustomer([
    'customerData' => array(
                            'card' => new \Omnipay\Common\CreditCard( // use the standard omnipay card to hold the customer data
                                [
                                    'firstName' => 'Mike',
                                    'lastName' => 'Jones',
                                    'email' => 'mike.jones@example.com',
                                    'address1' => 'Iconic Song House, 47 Penny Lane',
                                    'address2' => 'Wavertree',
                                    'city' => 'Liverpool',
                                    'company' => 'Mike Jones Enterprises',
                                    'country' => 'GB',
                                    'postal_code' => 'L18 1DE',
                                    'state' => 'Merseyside',
                                ]
                            ),
                            'customerMetaData' => [
                                'meta1' => 'Lorem Ipsom Dolor Est',
                                'meta2' => 'Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.',
                                'meta567890123456789012345678901234567890123456789' => 'Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.',
                            ],
                            'swedishIdentityNumber' => '123',
            ),
])->send();

You can find full list of options here., (*14)

Find customer (By id)

$customer = $gateway->findCustomer(1)->send();

Parse webhook notification

$notification = $gateway->parseNotification(
                                getallheaders(),
                                file_get_contents('php://input'), 
                                'MySecurityToken'
                            )
                        ->send();

This will fetch the event associated with the web hook., (*15)

Process repeat billing

TODO - this. Use the standard repeatePurchase() format (see sagepay for example structure), (*16)

Suggested generic omnipay driver flow

We are exploring using a simplified set of functions to allow agnostic processing. Each step checks if the method exists on the driver and if it does call it accordingly, before calling getXyzRefernce and adding it to the data passed around. It is hoped that this structure should work with several major gateways - we have considered Stripe, Paypal and the various GoCardless options. 1. CreateCustomer 2. completeCustomer 3. createPaymentMethod (either create card or create bank account) 4. completePaymentMethod (either complete card or complete bank account) 5. createMandate 6. completeMandate, (*17)

---- above this point is setting up the customer data (effectively taking it to the point of having an authorisation token), below is creating the transaction data, (*18)

  1. createPlan
  2. completePlan
  3. createSubscription
  4. completeSubscription

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found., (*19)

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to., (*20)

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request., (*21)

The Versions

09/03 2018

dev-master

9999999-dev https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

22/11 2017

0.1.13

0.1.13.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

27/10 2017

0.1.12

0.1.12.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

23/10 2017

0.1.11

0.1.11.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

25/08 2017

0.1.10

0.1.10.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

24/08 2017

0.1.9

0.1.9.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

09/08 2017

0.1.8

0.1.8.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

31/07 2017

0.1.7

0.1.7.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

31/07 2017

0.1.6

0.1.6.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

20/07 2017

0.1.5

0.1.5.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

05/07 2017

0.1.4

0.1.4.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

17/05 2017

0.1.3

0.1.3.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

17/05 2017

0.1.2

0.1.2.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

16/05 2017

0.1.1

0.1.1.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

03/05 2017

0.1.0

0.1.0.0 https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

11/04 2017

0.0.8-alpha

0.0.8.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

07/04 2017

0.0.7-alpha

0.0.7.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

07/04 2017

0.0.6-alpha

0.0.6.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

06/04 2017

0.0.5-alpha

0.0.5.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

06/04 2017

0.0.4-alpha

0.0.4.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

04/04 2017

0.0.3-alpha

0.0.3.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

14/03 2017

0.0.2-alpha

0.0.2.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless

28/02 2017

0.0.1-alpha

0.0.1.0-alpha https://github.com/digitickets/omnipay-gocardlessv2

GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kayla Daniels

payment pay gateway merchant purchase omnipay gocardless