$val){ $content .= "{$key}={$val}&"; } $content .= "key=".config::KEY; return strtoupper(md5($content)); } public function add($card_no,$card_type,$amount,$input,&$net_errno = 0) { $params = $this->req_params($card_no,$card_type,$amount,$input); $sign = $this->sign($params); $params['sign'] = $sign; $resp = http_request(config::ORDER_URL,$params,'POST',false, config::ExtHeaders, $net_errno); if (empty($resp)) { return [false,'系统错误',true]; } else { Log::record($resp,Log::DEBUG); $resp = json_decode($resp,true); if (empty($resp)) { return [false, '系统错误', true]; } elseif ($resp['code'] == 200) { return [true, $resp['msg'], false]; } else { return [false, $resp['msg'], false]; } } } public function query($refill_info) { } public function balance() { return [false, '暂无余额接口']; } }