|
@@ -53,7 +53,8 @@ class CTCard implements IOpenCard
|
|
|
$params['head'] = $this->head($head_method);
|
|
|
$params['biz'] = $biz;
|
|
|
$requestParameters = json_encode($params,JSON_UNESCAPED_UNICODE);
|
|
|
- $resp = http_post_data(config::production_env['DcoosExternalNetwork'], $requestParameters , config::HeaderProduction, $net_errno);
|
|
|
+ $resp = http_post_data(config::production_env['DcoosExternalNetwork'], $requestParameters,
|
|
|
+ config::HeaderProduction, $net_errno);
|
|
|
|
|
|
if (empty($resp)) {
|
|
|
return [false, '网络错误',''];
|
|
@@ -76,19 +77,63 @@ class CTCard implements IOpenCard
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function fraud_check($biz) : void
|
|
|
+ public function fraud_check($biz) : array
|
|
|
{
|
|
|
[$succ, $head, $biz] = $this->request('fraudCheck', $biz, $net_errno);
|
|
|
+ if($succ)
|
|
|
+ {
|
|
|
+ $code = intval($biz['code']);
|
|
|
+ $msg = $biz['codeMessage'];
|
|
|
+
|
|
|
+ if($code == 0) {
|
|
|
+ return [true,$msg];
|
|
|
+ } else {
|
|
|
+ return [false,$msg];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return [false,'网络错误'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- public function number_list($biz) : void
|
|
|
+ public function card_noes($biz) : array
|
|
|
{
|
|
|
[$succ, $head, $biz] = $this->request('qryNbrList', $biz, $net_errno);
|
|
|
+ if($succ)
|
|
|
+ {
|
|
|
+ $code = intval($biz['code']);
|
|
|
+ $msg = $biz['codeMessage'];
|
|
|
+ $phones = $biz['phoneList'];
|
|
|
+
|
|
|
+ if($code == 2000) {
|
|
|
+ return [true,$phones];
|
|
|
+ } else {
|
|
|
+ return [false,$msg];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return [false,'网络错误'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- public function address_delivery($biz) : void
|
|
|
+ public function sub_units($biz) : array
|
|
|
{
|
|
|
[$succ, $head, $biz] = $this->request('qryReceiveAddr', $biz, $net_errno);
|
|
|
+ if($succ)
|
|
|
+ {
|
|
|
+ $code = intval($biz['code']);
|
|
|
+ $msg = $biz['codeMessage'];
|
|
|
+ $phones = $biz['phoneList'];
|
|
|
+
|
|
|
+ if($code == 2000) {
|
|
|
+ return [true,$phones];
|
|
|
+ } else {
|
|
|
+ return [false,$msg];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return [false,'网络错误'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public function broadband_address_list($biz) : void
|
|
@@ -111,8 +156,8 @@ class CTCard implements IOpenCard
|
|
|
[$succ, $head, $biz] = $this->request('synOrderInfo', $biz, $net_errno);
|
|
|
}
|
|
|
|
|
|
- public function order_information_query($biz) : void
|
|
|
+ public function order_info($order_sn) : void
|
|
|
{
|
|
|
- [$succ, $head, $biz] = $this->request('queryOrderInfo', $biz, $net_errno);
|
|
|
+ [$succ, $head, $biz] = $this->request('queryOrderInfo', ['orderCode' => $order_sn], $net_errno);
|
|
|
}
|
|
|
}
|