daog-systems/bosspay-php

此包的最新版本(v0.4.1)没有可用的许可证信息。

v0.4.1 2024-08-02 03:24 UTC

This package is not auto-updated.

Last update: 2024-09-27 04:32:26 UTC


README

端点

基本URL: https://:8888/daog-systems/bosspay

登录

路由

  • /api/login

参数

  • username - (string)
  • password - (string)

响应

  • status - (string); OK, Not OK
  • token - (string), 用户令牌

交易

路由

  • /api/get_transactions

参数

  • token - (string)

响应

  • status - (string)
  • transactions - (array)

现金入账

路由

  • /api/cash_in

参数

  • token - (string)
  • amount - (decimal)

响应

  • status - (string)
  • redirect_url - (string); 支付网关重定向URL

Webhook

一旦收到付款,我们将以以下有效载荷结构将数据POST到您的自定义Webhook URL。

{"id":"xxx","user_id":"xxx","reference_no":"663993e2a914f"}

安装

通过composer安装

> composer require daog-systems/bosspay-php

使用方法

<?php
require 'vendor/autoload.php';

// Sample
$client = new Bosspay\Client();
$client->init('https://bosspay.gambolinc.com');
$response = $client->login('a', 'a');
$token = $response->token;

$response = $client->cash_in($token, 100);
print_r($response);

查看sample.php