tagmydoc/sage-accounting-sdk-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tagmydoc/sage-accounting-sdk-php

最新稳定版本:0.1.0

Composer 安装命令:

composer require tagmydoc/sage-accounting-sdk-php

包简介

Sage Accounting PHP SDK

README 文档

README

A beautiful, extendable API powered by Saloon.

Installation

composer require tagmydoc/sage-accounting-sdk-php

Usage

$client = new SageAccountingClient('CLIENT_ID', 'CLIENT_SECRET', route('services/sage'), ['readonly']);
$authenticator = AccessTokenAuthenticator::unserialize(get('sage:token')); // The get function is simply a placeholder for you to get the stored access token from your storage

if ($authenticator->hasExpired()) {
    $authenticator = $client->refreshAccessToken($authenticator);
    // Save the new access token in your storage
    // The save function is simply a placeholder for you to save the access token to your storage
    save('sage:token', $authenticator->serialize());
}

$client->authenticate($authenticator);

$request = CreateContactRequest::make();
$request->body()->add('contact', [
  'name' => 'John Smith'
]);

$response = $client->send($request);

$contactId = $response->json('id');

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-02