tamara-solution/php-sdk 问题修复 & 功能扩展

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

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

tamara-solution/php-sdk

最新稳定版本:2.0.6

Composer 安装命令:

composer require tamara-solution/php-sdk

包简介

Tamara PHP Client Library

README 文档

README

Tamara PHP SDK is a wrapper for the Tamara API.

Installation

Update composer.json

"require": {
    "tamara-solution/php-sdk": "1.*"
}

Usage

$configuration = Configuration::create($apiUrl, $apiToken, $apiRequestTimeout, $transport);
$client = Client::create($configuration);

$response = $client->getPaymentTypes('SA');

if ($response->isSuccess()) {
    var_dump($response->getPaymentTypes());
}

Notification Service

$notification = \Tamara\Notification\NotificationService::create('token-key');
$message = $notification->processAuthoriseNotification();

var_dump($message->getOrderId());
var_dump($message->getOrderStatus());
var_dump($message->getData());
Symfony DI
tamarapay.configuration:
    factory: ['Tamara\Configuration', create]
    arguments:
        - https://api.tamarapay.com
        - test_token
        
tamarapay.client:
    factory: ['Tamara\Client', create]
    arguments: ['@tamarapay.configuration']

Notes

  • We use Guzzlehttp library as the default http client transport and Nyholm http as a backup
  • You can use your own transport service and just need to implement the Tamara\HttpClient\ClientInterface and pass it to Configuration::create function

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-03