2017 © Pedro Peláez
 

library gopague-php

Go Pague PHP Library

image

gopague/gopague-php

Go Pague PHP Library

  • Monday, May 15, 2017
  • by bfgasparin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 76 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 17 % Grown

The README.md

Go Pague PHP Library

Requirements

PHP 7.0.1 and later., (*1)

Composer

You can install the bindings via Composer. Run the following command:, (*2)

composer require gopague/gopague-php

To use the go pague classes, use Composer's autoload:, (*3)

require_once('vendor/autoload.php');

Dependencies

This library require the following extension in order to work properly:, (*4)

  • curl, although you can use your own non-cURL client if you prefer
  • json (JSON handler)
  • mbstring (Multibyte String)

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available., (*5)

Getting Started

First you need set the email and password of the user to login to Go Pague API., (*6)

GoPague\Http\Client::setEmail('myemail@foo.bar')
GoPague\Http\Client::setPassword('secret');

Now you can use the resource binding classes to interact with Go Pague API., (*7)

// gets the list of banks
$banks = GoPague\Bank::all();

Note: See Resource Binding Classes section to know all classes and methods available., (*8)

The binding classes will automatically use the previous given email and password to login and autenticate to the API before the first API request., (*9)

But if you want to autenticate to API manually, just use:, (*10)

$credential = GoPague\Http\Client::login('myemail@foo', 'secret');

// gets the list of banks
$banks = GoPague\Bank::all();
// ...

You can access the Logged User data any time just calling the method:, (*11)

$credencial = GoPague\Http\Client::credential();

echo $credential->token;   // the Authenticated Token
echo $credential->userId;   // the Authenticated User Id
echo $credential->clientIds;   // The client ids linked to the Authenticted User

Resource Binding Classes

@todo, (*12)

Development

Install dependencies:, (*13)

``` bash composer install, (*14)


## Tests Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite: ```bash ./vendor/bin/phpunit

License

The GoPague PHP Library is open-sourced software licensed under the MIT license., (*15)

The Versions

15/05 2017

dev-master

9999999-dev

Go Pague PHP Library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bruno Ferme Gasparin

library gopague