An open API service indexing awesome lists of open source software.

https://github.com/digikraaft/flutterwave-php

Conveniently interact with the Flutterwave API with ease using PHP
https://github.com/digikraaft/flutterwave-php

digikraaft flutterwave flutterwave-php payment payment-gateway payment-integration php

Last synced: 14 days ago
JSON representation

Conveniently interact with the Flutterwave API with ease using PHP

Awesome Lists containing this project

README

          

# Conveniently interact with the Flutterwave API with ease!
![run-tests](https://github.com/digikraaft/flutterwave-php/workflows/run-tests/badge.svg)
[![Build Status](https://travis-ci.com/digikraaft/flutterwave-php.svg?token=6YhB5FxJsF7ENdMM7Mzz&branch=master)](https://travis-ci.com/digikraaft/flutterwave-php)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/digikraaft/flutterwave-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/digikraaft/flutterwave-php/?branch=master)
[![Code Intelligence Status](https://scrutinizer-ci.com/g/digikraaft/flutterwave-php/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

This package provides an expressive and convenient way to interact with the [Flutterwave API](https://developer.flutterwave.com/reference).

## Installation

You can install the package via composer:

```bash
composer require digikraaft/flutterwave-php
```

## Usage

All APIs documented in Flutterwave's [Developer Reference](https://developer.flutterwave.com/reference)
are currently supported by this package.
Using the individual API follows a general convention so that it can be simple and predictable.

```
'2020-07-07',
'to' => '2020-07-07',
'currency' => 'NGN',
];

$plans = PaymentPlan::list($params);

```
This also applies to `POST` and `PUT` requests.

For endpoints that require path parameters like the `fetch customer` with the request like `/payment-plans/{id}`,
simply pass in a string into the `API_END_POINT` like this:

```
'Gym Membership',
'status' => 'active',
];

$plan = PaymentPlan::update('12345678', $params);

```

There are a few exceptions to the `API_END_POINT` convention.

Check the wiki page [here](../../wiki) for detailed reference of the available methods




This package returns the exact response from the Flutterwave API but as the `stdClass` type
such that responses can be accessed like this:

```
status == 'success') {
echo $plan->data->name;
}

```
Future updates will see to improving on how the response object is handled.

## Documentation
For detailed documentation, check the wiki page [here](../../wiki)

## Todo
* More tests
* Better API response handling

## Testing

``` bash
composer test
```
## More Good Stuff
Check [here](https://github.com/digikraaft) for more awesome free stuff!

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Contributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security

If you discover any security related issues, please email dev@digitalkraaft.com instead of using the issue tracker.

## Credits

- [Tim Oladoyinbo](https://github.com/timoladoyinbo)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.