New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

pestopancake/laravel-go-cardless

A Laravel Wrapper for the Go Cardless PHP Client Library
10
Install
composer require pestopancake/laravel-go-cardless
Latest Version:1.0.2
License:MIT
Last Updated:May 10, 2019
Links: GitHub  ·  Packagist
Maintainer: pestopancake

Laravel Go Cardless

Total Downloads Latest Stable Version License

A Laravel 5.5 Wrapper for the Go Cardless PHP Client Library. This package provides simple elegant access to the Go Cardless PHP Client API from across the Laravel Application.

The included helper method makes accessing the underlying methods as easy as:

gocardless()->customers()->list()

Installation Laravel 5.5 +

Simply require the package through composer and let the Laravel Package Auto Discovery do the rest.

composer require ollywarren/laravel-go-cardless

Publish the vendor configuration:

php artisan vendor:publish (Select the relevant package from the list)

Set two environment variables in your Apps .env file:

GOCARDLESS_ENV="sandbox" OR "live"
GOCARDLESS_TOKEN="<YOUR API TOKEN>"

Installation Laravel 5.4

Use composer to add it to your project dependencies:

composer require ollywarren/laravel-go-cardless

Then inside your config/app.php

Add the package service provider to the providers array:

Pestopancake\LaravelGoCardless\GoCardlessServiceProvider::class,

Finally for good measure dump the composer autoloader to make sure we've pulled in the helper method:

composer dump-autoloader

Publish the vendor configuration:

php artisan vendor:publish

Set two environment variables in your Apps .env file:

GOCARDLESS_ENV="sandbox" OR "live"
GOCARDLESS_TOKEN="<YOUR API TOKEN>"

Usage Instructions

This package exposes the underlaying Go Cardless PHP Client Library usign the gocardless() helper method. Any of the methods described in the API Documentation will be accessible.

For example:

Get a List of Customers

gocardless()->customers()->list();

Create a New Customer

    gocardless()->customers()->create([
        'params' => [
            "given_name"    => "Jack", 
            "family_name"   => "Sparrow", 
            "email"         => "oljacky@sparrowsnest.com"
        ]
    ]);

For a full breakdown of the API see the Documentation or the PHP Client Library

Related Packages

kryptonpay/kryptonpay-php-sdk

Integração com API Krypton Pay em PHP

2,589 0
prestashop/module-lib-cache-directory-provider

Cache directory provider to use on prestashop modules

219,549 0
prestashop/module-lib-service-container

Service container to use on prestashop modules

217,961 7
cpx/cpx

Run any command from any composer package, even if it's not installed in your pr...

94,062 542
atnic/laravel-inspinia

Laravel Package for integrating Inspinia template and this package is Laravel Mi...

4,208 16

Version History

Version Released License
1.0.2 MIT
1.0.1 MIT
1.0 MIT