参数名称 | 类型 | 必填 | 说明 |
---|---|---|---|
tel | string | 是 | 固话宽带账号 |
amount | string | 是 | 面值 从获取商品API里获取 |
teltype | int | 是 | 固话类型 1联通 2电信 3铁通 4移动 |
rechargetype | int | 是 | 充值类型 1固话 2宽带 3综合 |
outorderno | string | 是 | 商家订单号 |
sign | string | 是 | 签名MD5加密 md5(amount+mobile+outorderno+rechargetype+teltype+appsecret) |
参数名称 | 类型 | 说明 |
---|---|---|
tel | string | 固话宽带账号 |
amount | string | 面值 |
outorderno | string | 商家订单号 |
orderno | string | 订单号 |
totalfee | string | 总金额 |
teltype | int | 固话类型 1联通 2电信 3铁通 4移动 |
rechargetype | int | 充值类型 1固话 2宽带 3综合 |
rechargestatus | int | 充值状态 0充值中 1充值成功 2充值失败 即时返回0,状态信息请从订单详情接口获取 |
<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $tel = '0571-56565366'; $amount = 100; $teltype = 1; $rechargetype = 1; $outorderno = '45646548786';//商家订单号 $sign = 'ssswwxxssswjjk'; //(tel,amount,teltype,rechargetype,outorderno按键值排序后做md5处理) $url = "https://api.jisuapi.com/telrecharge/recharge?appkey=$appkey&tel=$tel&amount=$amount&rechargetype=$rechargetype&teltype=$teltype&outorderno=$outorderno&sign=$sign"; $result = curlOpen($url, ['ssl'=>true]); $jsonarr = json_decode($result, true); //exit(var_dump($jsonarr)); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; echo $result['tel'].' '.$result['amount'].' '.$result['outorderno'].' '.$result['rechargetype'].' '.$result['teltype'].'
'; echo $result['orderno'].' '.$result['actuallytotalfee'].' '.$result['rechargestatus'].'
'; function makeSign($queryarr, $appsecret) { ksort($queryarr, SORT_STRING); $str = implode($queryarr); $str .= $appsecret; //exit($str); $str = md5($str); return $str; }
{ "status": 0, "msg": "ok", "result": { "tel": "0571-56565366", "amount": "100", "outorderno": "", "orderno": "201604280717555074534", "totalfee": "99.65", "teltype": "1", "rechargetype": "1", "rechargestatus": "0" } }
代号 | 说明 |
---|---|
201 | 号码为空 |
202 | 充值金额为空 |
203 | 充值金额不正确 |
204 | 号码不正确 |
205 | 签名为空 |
206 | 验签失败 |
207 | 账户余额不足 |
208 | 不支持的号码 |
209 | 订单号为空 |
210 | 未知错误 |
211 | 商家订单号为空 |
212 | 商家订单号已存在 |
代号 | 说明 |
---|---|
101 | APPKEY为空或不存在 |
102 | APPKEY已过期 |
103 | APPKEY无请求此数据权限 |
104 | 请求超过次数限制 |
105 | IP被禁止 |
106 | IP请求超过限制 |
107 | 接口维护中 |
108 | 接口已停用 |
计次套餐 | 套餐规格 | 价格 | ||
---|---|---|---|---|
20元固话充值 | 20元次 | 20.00 元 | ≈1元/次 | |
50元固话充值 | 50元次 | 50 元 | ≈1元/次 | |
100元固话充值 | 100元次 | 100 元 | ≈1元/次 | |
200元固话充值 | 200元次 | 200 元 | ≈1元/次 | |
500元固话充值 | 500元次 | 500 元 | ≈1元/次 |
© 2015-2025 杭州极速互联科技有限公司 版权所有 浙ICP备17047587号-4 浙公网安备33010502005096 增值电信业务经营许可证:浙B2-20190875