oyta/feiyin

飞银卡包插件

v1.0 2023-03-07 06:11 UTC

This package is not auto-updated.

Last update: 2024-09-18 11:48:10 UTC


README

安装

composer require oyta/feiyin

使用说明

  • 引入方法
use Oyta\Feiyin\Joint;
  • 普通用户数据提交与响应 (用户操作接口不需要设置key)
Joint::consumer($url,$param);
  • 普通用户数据请求与响应示例
$param = [
    'moblie'=>'185xxxxxxxx'
  ];
$url = '/cardlist';
$res = Joint::consumer($url,$param);
return $res;
  • 设置Key
Joint::setkey($publicKey, $privateKey);
  • 商户数据提交与响应 (商户操作接口需要设置key)
Joint::merchant($url,$param);
  • 商户数据请求与响应示例
public $publicKey = 'xxxxxxxx';
public $privateKey = 'xxxxxxxx';
Joint::setkey($this->publicKey, $this->privateKey);
$param = [
    'appid' =>'2056371498',
    'timestamp' =>time(),
    'param' => [ //提交的参数都需要增加在param内
        'secret' => 'PZfM6UWHAzyX7JnBFe38u1KLrOgExo4q',
        'mobile' => '18575510399',
        ],
   ];
$url = '/cardlist'
$res = Joint::merchant($url,$param);
return $res;