定制 bogdananton/avangate-rest-api-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bogdananton/avangate-rest-api-client

最新稳定版本:1.0.3

Composer 安装命令:

composer require bogdananton/avangate-rest-api-client

包简介

README 文档

README

This is a simple client built on top of Guzzle.

Usage

Initialize by calling:

$client = new Client([
    'code' => MERCHANT_CODE,
    'key' => MERCHANT_APIKEY,
    'base_uri' => 'https://api.avangate.com/3.0/'
]);

Use as a Guzzle client

try {
    $response = $client->get('orders/?StartDate=2015-01-01');
    $orderListing = json_decode($response->getBody()->getContents());
    
    print_r($orderListing);
    
} catch (\GuzzleHttp\Exception\ClientException $e) {
    $contents = json_decode($e->getResponse()->getBody()->getContents());
    var_dump($contents->message);
    
} catch (\Exception $e) {
    var_dump($e->getMessage());
}

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-05