Skip to content

AddPay PHP REST Client to assist in connection to the AddPay API's.

Notifications You must be signed in to change notification settings

AddPay/addpay-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

AddPay PHP REST Client

This is a standard, off the shelf HTTP REST CLIENT that does AddPay authentication behind the scenes for every API call, zero maintenance is required. You pass the desired payload across as a simple array, no complex object involved.

Why?

  • Data parsing is consistent, the body will always be returned as a generic object class even in the event of a failure.
  • Simple, 1-line API calls.
  • No magic, everything is transparent and standardized. REST.
  • No low-level code. You don't have to deal with the pains of curl options.
  • No maintenance. If a new endpoint is created, simply add your new line: Api::get($newEndpoint); or for a post use (Api::post($endPoint)->send())->body and you're done.

How To

See the exmaples for full usage, or if that isn't clear enough to you:

  • Instantiate the AddPay HTTP Library once-off:
require('package/src/bootstrap');

use \AddPay\Api;

addpay([
  'client_id'       => 'client_id_here',
  'client_secret'   => 'client_secret_here',
  'client_live'     => false
]);
  • Call any API endpoint:
$restCall = Api::get('/transactions')->send();
  • Getting the result:
$restCall->body;

About

AddPay PHP REST Client to assist in connection to the AddPay API's.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages