Skip to content

bongloy-community/bongloy-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bongloy PHP bindings

Build Bongloy PHP Total Downloads License

The Bongloy PHP library provides convenient access to the Bongloy API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Bongloy API.

Requirements

PHP 5.6.0 and later.

Composer

You can install the bindings via Composer. Run the following command:

composer require bongloy/bongloy-php

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Getting Started

Simple usage looks like:

\Bongloy\Bongloy::setApiKey('sk_test_*****');
$charge = \Bongloy\Charge::create([
    'amount' => 1000,
    'currency' => 'USD',
    'source' => '6b1ca112-add7-4bc6-b520-829e004c0580',
]);
echo $charge;

Documentation

For a comprehensive list of examples, check out the API documentation.