2017 © Pedro Peláez
 

library laravel-go-cardless

A Laravel Wrapper for the Go Cardless PHP Client Library

image

ollywarren/laravel-go-cardless

A Laravel Wrapper for the Go Cardless PHP Client Library

  • Friday, November 3, 2017
  • by ollywarren
  • Repository
  • 1 Watchers
  • 9 Stars
  • 2,833 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 18 % Grown

The README.md

Laravel Go Cardless

Total Downloads Latest Stable Version License, (*1)

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., (*2)

The included helper method makes accessing the underlying methods as easy as:, (*3)

gocardless()->customers()->list(), (*4)

Installation Laravel 5.5 +

Simply require the package through composer and let the Laravel Package Auto Discovery do the rest., (*5)

composer require ollywarren/laravel-go-cardless, (*6)

Publish the vendor configuration:, (*7)

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

Set two environment variables in your Apps .env file:, (*9)

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

Installation Laravel 5.4

Use composer to add it to your project dependencies:, (*10)

composer require ollywarren/laravel-go-cardless, (*11)

Then inside your config/app.php, (*12)

Add the package service provider to the providers array:, (*13)

Ollywarren\LaravelGoCardless\GoCardlessServiceProvider::class,, (*14)

Finally for good measure dump the composer autoloader to make sure we've pulled in the helper method:, (*15)

composer dump-autoloader, (*16)

Publish the vendor configuration:, (*17)

php artisan vendor:publish, (*18)

Set two environment variables in your Apps .env file:, (*19)

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., (*20)

For example:, (*21)

Get a List of Customers

gocardless()->customers()->list();, (*22)

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, (*23)

The Versions

03/11 2017

dev-master

9999999-dev https://github.com/ollywarren/laravel-go-cardless

A Laravel Wrapper for the Go Cardless PHP Client Library

  Sources   Download

MIT

The Requires

 

by Olly Warren

laravel composer package go cardless

05/10 2017

1.0

1.0.0.0 https://github.com/ollywarren/laravel-go-cardless

A Laravel Wrapper for the Go Cardless PHP Client Library

  Sources   Download

MIT

The Requires

 

by Olly Warren

laravel composer package go cardless