healyhatman / keypay-php
Package to access the KeyPay API
Fund package maintenance!
:vendor_name
Installs: 1 830
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.0
- guzzlehttp/psr7: ^2.0
- healyhatman/oauth2-keypay: ^1
README
A client library for the KeyPay API, built from the provided OpenAPI v2 specification using the OpenAPI Generator
Requirements
- PHP 7.4
Installation
You can install the package via composer:
composer require healyhatman/keypay-php
Usage
Before resource requests can be made, the application must be authorised. KeyPay supports other authorisation flows, but this package assumes you're using OAuth2
Authorisation Code Flow
See Healyhatman/oauth2-keypay for instructions on obtaining Oauth2 credentials
Interacting with the API
Once you have a valid access token, you can instantiate a KeypayPHP\Application, and use it to help build the appropriate API object and the desired methods.
Insantiate an Application
$application = new \KeypayPHP\Application($access_token);
Access a particular API Group
All of the API classes are available under OpenAPI\Client\Api
. Using forApi()
will allow you to access the API using your application object's transport
$employees = $application->forApi('\OpenAPI\Client\Api\EmployeeApi')->auEmployeeGetEmployees($business_id);
Testing
Not implemented yet, one day
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.