diff --git a/README.md b/README.md index e69de29..44e2d2c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,60 @@ +# Stripe PHP bindings + +[![Latest Stable Version](https://poser.pugx.org/starfolksoftware/flutterwave-php/v/stable.svg)](https://packagist.org/packages/starfolksoftware/flutterwave-php) +[![Total Downloads](https://poser.pugx.org/starfolksoftware/flutterwave-php/downloads.svg)](https://packagist.org/packages/starfolksoftware/flutterwave-php) +[![License](https://poser.pugx.org/starfolksoftware/flutterwave-php/license.svg)](https://packagist.org/packages/starfolksoftware/flutterwave-php) +[![Code Coverage](https://coveralls.io/repos/starfolksoftware/flutterwave-php/badge.svg?branch=master)](https://coveralls.io/r/starfolksoftware/flutterwave-php?branch=master) + +The Flutterwave PHP library provides convenient access to the Flutterwave 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 Flutterwave +API. + +## Requirements + +PHP 8.0 and later. + +## Composer + +You can install the bindings via [Composer](http://getcomposer.org/). Run the following command: + +```bash +composer require starfolksoftware/flutterwave-php +``` + +To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading): + +```php +require_once('vendor/autoload.php'); +``` + +## Dependencies + +Any package that implements [psr/http-client-implementation package](https://packagist.org/providers/psr/http-client-implementation) + +## Getting Started + +Simple usage looks like: + +```php +use StarfolkSoftware\Flutterwave\Client as FlutterwaveClient; +use StarfolkSoftware\Flutterwave\Options\CreatePlanOptions; +use StarfolkSoftware\Flutterwave\Options; + +$flutterwave = new FlutterwaveClient(new Options([ + 'secretKey' => 'secret', +])); + +$customer = $flutterwave->plans->create(new CreatePlanOptions([ + 'name' => 'Test Plan', + 'amount' => 100, + 'interval' => 'monthly' +])); + +echo $customer; +``` + +## Documentation + +See the [PHP API docs](https://developer.flutterwave.com/reference#introduction-1).