Download the PHP package digikraaft/paystack-php without Composer
On this page you can find all versions of the php package digikraaft/paystack-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digikraaft/paystack-php
More information about digikraaft/paystack-php
Files in digikraaft/paystack-php
Package paystack-php
Short Description PHP Implementation of Paystack API
License MIT
Homepage https://github.com/digikraaft/paystack-php
Informations about the package paystack-php
Introduction
This package provides an expressive and convenient way to interact with the Paystack API.
Installation
You can install the package via composer:
Usage
All APIs documented in Paystack's Developer Reference are currently supported by this package. Using the individual API follows a general convention so that it can be simple and predictable.
Before this, the API key needs to be set. For example, to access the customer/list
endpoint,
You can easily pass parameters to be sent as arguments to the API_END_POINT
method like this:
This also applies to POST
and PUT
requests.
For endpoints that require path parameters like the fetch customer
with the request like /customer/email_or_id_or_customer_code
,
simply pass in a string into the API_END_POINT
like this:
For API_END_POINT
s that take both path and body parameters like the update customer
with the PUT
request customer/id_or_customer_code
,
simply pass in a string as the first argument, an array as the second like this:
There are a few exceptions to the API_END_POINT
convention.
The endpoint paymentrequest/list
becomes Invoice::list()
. This applies to all other actions as documented in the Paystack reference.\
The endpoint bvn/match
becomes Bank::bvnMatch(array $params)
\
The endpoint decision/bin/{bin}
becomes Bank::resolveCardBin(string $bin)
This package returns the exact response from the Paystack API but as the stdClass
type such that responses can be accessed like this:
Future updates will see to improving on how the response object is handled.
Documentation
For detailed documentation, check the wiki page here
Todo
- Comprehensive tests
- Better API response handling
Testing
More Good Stuff
Check here for more awesome free stuff!
Alternatives
- paystack-php
- perfectmak/paystack-php
- matscode/paystack-php
- PHP Library For Paystack.co (Unofficial)
- Cakephp-Paystack
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Tim Oladoyinbo
- All Contributors
License
The MIT License (MIT). Please see License File for more information.