2017 © Pedro Peláez
 

library balanced

Client for Balanced API

image

balanced/balanced

Client for Balanced API

  • Saturday, January 10, 2015
  • by aipp
  • Repository
  • 11 Watchers
  • 72 Stars
  • 298,587 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 38 Forks
  • 7 Open issues
  • 31 Versions
  • 1 % Grown

The README.md

Balanced

Online Marketplace Payments, (*1)

Build Status, (*2)

The design of this library was heavily influenced by Httpful., (*3)

v1.x requires Balanced API 1.1. Use v0.x for Balanced API 1.0., (*4)

v0.x requires Balanced API 1.0., (*5)

ATTN COMPOSER USERS

In the past this README incorrectly communicated specifying * for the version of balanced. master, 1.x, requires Balanced API v1.1 and will require updates to your application. Applications using * to specify the balanced version obtained via Composer will automatically pick up the latest version and will cause issues for applications that have not been updated to use balanced-php 1.x. If your application is configured in the manner, we advise you to pin your balanced version at 0.*, or something more specific such as 0.7.5.0, to ensure your application continues to function normally using Balanced API v1.0 until you're able to upgrade to the latest version., (*6)

Requirements

Issues

Please use appropriately tagged github issues to request features or report bugs., (*7)

Installation

You can install using composer or from source. Note that Balanced is PSR-0 compliant:, (*8)

Composer

If you don't have Composer install it:, (*9)

$ curl -s https://getcomposer.org/installer | php

Require balanced in your composer.json:, (*10)

{
    "require": {
        "balanced/balanced": "1.*"
    }
}

NOTE: You may also define a more specific version if desired, e.g. 1.0.1, (*11)

Refresh your dependencies:, (*12)

$ php composer.phar update

Then make sure to require the autoloader and initialize all:, (*13)

<?php
require(__DIR__ . '/vendor/autoload.php');

\Httpful\Bootstrap::init();
\RESTful\Bootstrap::init();
\Balanced\Bootstrap::init();
...

Source

Download Httpful source:, (*14)

$ curl -s -L -o httpful.zip https://github.com/nategood/httpful/zipball/v0.2.3;
$ unzip httpful.zip; mv nategood-httpful* httpful; rm httpful.zip

Download RESTful source:, (*15)

$ curl -s -L -o restful.zip https://github.com/matthewfl/restful/zipball/master;
$ unzip restful.zip; mv matthewfl-restful* restful; rm restful.zip

Download the Balanced source:, (*16)

$ curl -s -L -o balanced.zip https://github.com/balanced/balanced-php/zipball/master
$ unzip balanced.zip; mv balanced-balanced-php-* balanced; rm balanced.zip

And then require all bootstrap files:, (*17)

<?php
require(__DIR__ . "/httpful/bootstrap.php")
require(__DIR__ . "/restful/bootstrap.php")
require(__DIR__ . "/balanced/bootstrap.php")

\Httpful\Bootstrap::init();
\RESTful\Bootstrap::init();
\Balanced\Bootstrap::init();
...

Quickstart

Refer to the Quickstart guide in the Balanced Documentation., (*18)

Usage

See https://docs.balancedpayments.com/overview?language=php for guides and documentation., (*19)

Testing

$ phpunit --bootstrap vendor/autoload.php tests/

Or if you'd like to skip network calls:, (*20)

$ phpunit --exclude-group suite --bootstrap vendor/autoload.php tests/

Publishing

  1. Ensure that all tests pass
  2. Increment minor VERSION in src/Balanced/Settings and composer.json (git commit -am 'v{VERSION} release')
  3. Tag it (git tag -a v{VERSION} -m 'v{VERSION} release')
  4. Push the tag (git push --tag)
  5. Packagist will see the new tag and take it from there

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Write your code and tests
  4. Ensure all tests still pass (phpunit --bootstrap vendor/autoload.php tests/)
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new pull request

Documentation scenarios

Each scenario lives in the scenarios directory and is comprised of the following:, (*21)

  • definition.php - Method definition
  • request.php - Scenario code
  • executable.php - Processed request.php. Can be executed directly in PHP. Generated by render_scenarios.php.
  • php.mako - Documentation template to be consumed by balanced-docs. Generated by - render_scenarios.php.

Scenarios can be validated by running validate_scenarios.php from within the scenarios folder., (*22)

Contributors

The Versions

10/01 2015

dev-master

9999999-dev http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

10/01 2015

dev-fix_scenarios

dev-fix_scenarios http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

20/12 2014

1.3.0

1.3.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

14/11 2014

dev-orders-all-the-things

dev-orders-all-the-things http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

29/09 2014

dev-snippets

dev-snippets http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

23/05 2014

1.2.0

1.2.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

29/04 2014

1.1.2

1.1.2.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

09/04 2014

1.1.0

1.1.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

09/04 2014

1.0.1

1.0.1.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

20/03 2014
11/03 2014

dev-rev1

dev-rev1 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

11/03 2014

dev-rev0

dev-rev0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

04/01 2014

0.7.5.0

0.7.5.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

07/11 2013

0.7.4.1

0.7.4.1 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

15/10 2013

0.7.4

0.7.4.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

06/07 2013

0.7.3.1

0.7.3.1 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

03/07 2013

0.7.3

0.7.3.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

28/06 2013

0.7.2

0.7.2.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

The Development Requires

api payments

26/03 2013

0.7.1

0.7.1.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

12/11 2012

0.7.0

0.7.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

12/11 2012

0.7.x-dev

0.7.9999999.9999999-dev http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

06/09 2012

0.6.6

0.6.6.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

21/08 2012

0.6.5

0.6.5.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

09/08 2012

0.6.4

0.6.4.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

26/07 2012

0.6.2

0.6.2.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

17/07 2012

0.6

0.6.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

16/07 2012

0.5

0.5.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

16/07 2012

0.4

0.4.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

13/07 2012

0.3

0.3.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

02/07 2012

0.2

0.2.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments

27/06 2012

0.1

0.1.0.0 http://github.com/balanced/balanced-php

Client for Balanced API

  Sources   Download

MIT

The Requires

 

api payments