cyphp/empg

Enhanced MPG unified API for PHP 7.x

0.0.2 2017-01-31 21:19 UTC

This package is not auto-updated.

Last update: 2024-10-27 02:24:51 UTC


README

Total Downloads Latest Stable Version

Enhanced MPG unified API library for PHP 7.x

Inspired by https://github.com/Moneris/eCommerce-Unified-API-PHP

Features

  • PHP 7.x compatible
  • Improvement reliability
  • Composer package
  • Mimic as much as original class nomenclature

Install

composer require cyphp/empg

Example

require_once './vender/autoload.php';

use Empg\Client;

$client = new Client('MY_STORE_ID', 'MY_API_TOKEN');

$response = $client->post(
    new MpgRequest(
        new MpgTransaction([
            // ...
        ])
    )
);

Use Test Endpoints

$client = new Client('MY_STORE_ID', 'MY_API_TOKEN', [
    'env' => Empg\Configuration::ENV_TEST,
]);

License

MIT