litegoio/litego-php 问题修复 & 功能扩展

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

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

litegoio/litego-php

Composer 安装命令:

composer require litegoio/litego-php

包简介

Litego.io API PHP Class

README 文档

README

Simple Litego API wrapper class, in PHP. Litego API documentation can be found here https://litego.io/documentation/

Installation

Preferred way to install is with Composer as external websocket client library is used.

Just add

"require": {
  "litegoio/litego-php": "1.1.*"
}

in your projects composer.json.

Examples

Start by use-ing the class and creating an instance with test/live mode

require('vendor/autoload.php');

use Litego\Litego;

$litego = new Litego();

If you want to use test mode

$litego = new Litego('test');

After registration on https://litego.io and getting secret key and merchant ID values try to authenticate (get auth token for other requests) Two ways how to get auth token:

  • secret key and merchant ID
  • refresh token (if exists).
$result = $litego->authenticate($merchantId, $secretKey);

or

$result = $litego->reauthenticate($refreshToken $merchantId, $secretKey);

You will get auth token and refresh token values. Auth token will be used then for other API requests. Refresh token should be saved for reauthentication when auth token is expired.

Create charge

$result = $litego->createCharge($authToken, $description, $amount_satoshi);
print_r($result);

Charges list

$result = $litego->chargesList($authToken, array(
'page' => 1,
'pageSize' => 5,
'paidOnly' => true,
));
print_r($result);

Get charge

$result = $litego->getCharge($authToken, $chargeId);
print_r($result);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固