zhuk / payeer-trade-api
v0.1.0-alpha.1
2022-06-20 09:35 UTC
Requires
- php: >=8.1.0
- ext-json: *
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.17.0
- vimeo/psalm: ^4.23
This package is auto-updated.
Last update: 2025-02-20 15:44:13 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