The Acquired API Library for PHP enables you to work with Acquired APIs.
|--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.phphttps://developer.acquired.com/integrations
You can use Composer or simply Download the Release
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:
composer require Acquired/php-api-library:dev-master- set config parameters in AcquiredConfig.php.
- move the example directory to you web root.
- require the below file in the example files if you use composer.
require_once __DIR__ . '/../vendor/autoload.php';It is very simply to use like this:
- new a obj accoding to your transaction type.
use Acquired\Service\AuthHandle;
$auth = new AuthHandle();- set parameters.
$auth->setParam("amount",1);- post parameters.
$result = $auth->postJson();- deal response.
$response_hash = $auth->generateResHash($result);
if($reponse_hash == $result['response_hash']){
// do your job.
}PHP 5.3+
Curl