zhuk/payeer-trade-api

v0.1.0-alpha.1 2022-06-20 09:35 UTC

This package is auto-updated.

Last update: 2024-04-20 13:48:03 UTC


README

Installation

$ composer require zhuk/payeer-trade-api

Usage

Get all orders using http client using guzzle PSR implementation:

<?php

require_once 'vendor/autoload.php';

$appId = getenv('API_ID') ?: 'test';
$apiSecret = getenv('API_SECRET') ?: 'test';

$httpClient = new GuzzleHttp\Client();
$httpFactory = new GuzzleHttp\Psr7\HttpFactory();
$signer = new Zhuk\Payeer\TradeApi\HmacHeaderSigner((string) $apiSecret);

$api = new Zhuk\Payeer\TradeApi\HttpTradeClient(
    $httpClient,
    $httpFactory,
    $httpFactory,
    $httpFactory,
    $signer,
    (string) $appId
);

$response = $api->getAllOrders();
var_dump($response);

Run tests:

$ composer test

Run linter:

$ composer lint