2017 © Pedro Peláez
 

library php-api-library

A PHP client library for accessing Acquired APIs

image

acquired/php-api-library

A PHP client library for accessing Acquired APIs

  • Thursday, May 10, 2018
  • by acquired
  • Repository
  • 0 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Acquired-api-sdk-php

Description

The Acquired API Library for PHP enables you to work with Acquired APIs., (*1)

Directory

|--example  
    auth_.html
    auth_.php
    refund.html
    refund.php
    ...
|--lib  
    AcquiredCommon.php
    AcquiredConfig.php
    AcquiredException.php
    |--service
        HandlePub.php
        AuthHandle.php
        AuthOnlyHandle.php
        CaptureHandle.php
        AuthCaptureHandle.php
        ...
|--public  
    |--css
        general.css
    |--js
|--logs
readme.md  
index.php

Documentation

https://developer.acquired.com/integrations, (*2)

Installation

You can use Composer or simply Download the Release, (*3)

Composer

The preferred method is via composer. Follow the installation instructions if you do not already have composer installed. Once composer is installed, execute the following command in your project root to install this library:, (*4)

composer require Acquired/php-api-library:dev-master

Examples

Get start

  1. set config parameters in AcquiredConfig.php.
  2. move the example directory to you web root.
  3. require the below file in the example files if you use composer.
require_once __DIR__ . '/../vendor/autoload.php';

How to use

It is very simply to use like this: 1. new a obj accoding to your transaction type., (*5)

use Acquired\Service\AuthHandle;
$auth = new AuthHandle();
  1. set parameters.
$auth->setParam("amount",1);
  1. post parameters.
$result = $auth->postJson();
  1. deal response.
$response_hash = $auth->generateResHash($result);
if($reponse_hash == $result['response_hash']){

    // do your job.

}

Requirements

PHP 5.3+
Curl, (*6)

The Versions

10/05 2018

dev-master

9999999-dev

A PHP client library for accessing Acquired APIs

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0