Properties

$app

$app : \think\App

应用实例

Type

\think\App

$api

$api : string

待请求的链接

Type

string

$method

$method : string

待请求的链接

Type

string

$userid

$userid : 

由鼎信商务提供

Type

$pwd

$pwd : 

由鼎信商务提供

Type

$key

$key : 

由鼎信商务提供

Type

$param

$param : 

需要发送的的参数

Type

$output

$output : 

响应内容

Type

Methods

__construct()

__construct(\think\App  $app) 

Service constructor.

Parameters

\think\App $app

instance()

instance(array  $args) : static

静态实例对象

Parameters

array $args

Returns

static

api()

api(string  $api) : $this

ip:端口

Parameters

string $api

Returns

$this

userid()

userid(string  $userid) : $this

由鼎信商务提供

Parameters

string $userid

Returns

$this

pwd()

pwd(string  $pwd) : $this

由鼎信商务提供

Parameters

string $pwd

Returns

$this

key()

key(string  $key) : $this

由鼎信商务提供

Parameters

string $key

Returns

$this

chongZhi()

chongZhi(string  $orderid, integer  $face, string  $account, integer  $amount = 1) : $this

话费充值

Parameters

string $orderid

用户提交的订单号 用户提交的订单号,最长32位(用户保证其唯一性)

integer $face

充值面值 以元为单位,包含10、20、30、50、100、200、300、500 移动联通电信

string $account

手机号码 需要充值的手机号码

integer $amount

购买数量 只能为1

Returns

$this

query()

query(string  $orderid) : $this

通用查询

Parameters

string $orderid

用户提交的订单号 用户提交的订单号,最长32位(用户保证其唯一性)

Returns

$this

money()

money() : $this

用户余额查询

Returns

$this

txchongzhi()

txchongzhi(string  $orderid, string  $account, integer  $productid, integer  $amount, string  $ip, string  $times) : $this

腾讯充值

Parameters

string $orderid

用户提交的订单号 用户提交的订单号,最长32位(用户保证其唯一性)

string $account

QQ号 需要充值的QQ号

integer $productid

产品id 可以通过queryTXproduct查询

integer $amount

购买数量

string $ip

充值QQ号ip 可以为空

string $times

时间戳 格式:yyyyMMddhhmmss

Returns

$this

queryTXproduct()

queryTXproduct() : $this

可充值腾讯产品查询

Returns

$this

gprsChongzhiAdvance()

gprsChongzhiAdvance(string  $orderid, string  $account, integer  $gprs, integer  $area, integer  $effecttime, integer  $validity, string  $times) : $this

流量充值

Parameters

string $orderid

用户提交的订单号 用户提交的订单号,最长32位(用户保证其唯一性)

string $account

充值手机号 需要充值的手机号

integer $gprs

充值流量值 单位:MB(具体流量值请咨询商务)

integer $area

充值流量范围 0 全国流量,1 省内流量

integer $effecttime

生效日期 0 即时生效,1次日生效,2 次月生效

integer $validity

流量有效期 传入月数,0为当月有效

string $times

时间戳 格式:yyyyMMddhhmmss

Returns

$this

checkCost()

checkCost(string  $orderid) : $this

会员订单成本价查询

Parameters

string $orderid

用户订单号 用户提交订单号

Returns

$this

toArray()

toArray() 

Throws

\DtApp\ThinkLibrary\exception\DtaException

initialize()

initialize() : $this

初始化服务

Returns

$this

http()

http() 

网络请求

createSign()

createSign() : string

签名

Returns

string