首页 充值缴费 固话宽带充值
固话宽带充值

固话宽带充值

  • 1721
  • 1263
移动、联通固话宽带充值 正式上线以后,请在会员中心绑定IP白名单
接口已下架
https://api.jisuapi.com/telrecharge/recharge
JSON
GET POST
https://api.jisuapi.com/telrecharge/recharge?appkey=yourappkey&tel=057156565366&amount=100&teltype=1&rechargetype=1&outorderno=&sign=rewwyyccxsswww

请求参数:

API在线测试
参数名称类型必填说明
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; }

JSON返回示例 :

{
    "status": 0,
    "msg": "ok",
    "result": {
        "tel": "0571-56565366",
        "amount": "100",
        "outorderno": "",
        "orderno": "201604280717555074534",
		"totalfee": "99.65",
		"teltype": "1",
		"rechargetype": "1",
		"rechargestatus": "0"
    }
}
                    

API错误码:

代号说明
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元/次

活动推荐ACTIVITY 更多

  • orc活动

其它推荐RECOMMENDED DATA 更多