Download the PHP package ayoolatj/paystack-php without Composer
On this page you can find all versions of the php package ayoolatj/paystack-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ayoolatj/paystack-php
More information about ayoolatj/paystack-php
Files in ayoolatj/paystack-php
Informations about the package paystack-php
Yet another PHP API wrapper for Paystack.
This library aims to provide convenient access to the Paystack API using predefined services grouped following the Paystack API Docs. These service classes initialize defined Resources dynamically from API responses.
Requirements
- PHP 7.1+
Installing
via Composer
To install the package via Composer, run the following command:
Dependencies
Dependencies should be handled automatically by composer.
Usage
Using the paystack instance, you can perform multiple actions across several services as well as retrieve different resources.
Accessing Resource Attributes
You can access the resource attributes via toArray()
.
Accessing response data
You can access the data from the last API response on any resource object via getLastResponse()
.
Pagination
All services with a list endpoint support pagination and pagination parameters can be passed along to limit the result set.
Auto-Pagination
List endpoints return an instance of a Paginator class which supports auto-pagination. This makes it easy to handle fetching multi page lists without having to manually paginate results and perform subsequent requests.
To use the auto-pagination feature, call autoPagingIterator()
on the returned
Paginator object to iterate over all objects matching your initial parameters.
Webhooks
Paystack uses webhooks to notify your application when transaction events occur on your integration. It is important to verify that events originate from Paystack to avoid delivering value based on a counterfeit event.
To verify a paystack event:
Testing
TODOs
- [ ] Authorization Resource
- [ ] Roundup tests
- [ ] Metadata builder
- [ ] Clean up readme
- [ ] Non composer loader