-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). |