New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

acquired/php-api-library

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acquired/php-api-library

A PHP client library for accessing Acquired APIs

Source
Packagist
Version
dev-master
Version published
Total downloads
22
Maintainers
0
Created
Source

Acquired-api-sdk-php

Description

The Acquired API Library for PHP enables you to work with Acquired APIs.

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

Installation

You can use Composer or simply Download the Release

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:

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

Examples

Get start

  • 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';

How to use

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.
    
}

Requirements

PHP 5.3+
Curl

FAQs

Package last updated on 28 May 2020

Related posts