|
@@ -22,7 +22,7 @@ class RefillPhone extends refill\IRefillPhone
|
|
|
$params['orderid'] = $order_sn;
|
|
|
$params['price'] = $amount;
|
|
|
$params['teltype'] = $this->phone_type($phone);
|
|
|
- $params['timeout'] = 7200;
|
|
|
+ $params['timeout'] = config::NotifyTimeout;
|
|
|
$params['notify'] = config::NOTIFY_URL;
|
|
|
$params['time'] = time();
|
|
|
$params['rand'] = rand(100000, 999999);
|
|
@@ -72,6 +72,7 @@ class RefillPhone extends refill\IRefillPhone
|
|
|
{
|
|
|
Log::record($resp, Log::DEBUG);
|
|
|
$resp = json_decode($resp, true);
|
|
|
+
|
|
|
if (empty($resp)) {
|
|
|
return [false, '系统错误'];
|
|
|
}
|
|
@@ -89,6 +90,7 @@ class RefillPhone extends refill\IRefillPhone
|
|
|
} else {
|
|
|
return [false, $resp['data']];
|
|
|
}
|
|
|
+
|
|
|
return [true, $order_state];
|
|
|
}
|
|
|
else {
|
|
@@ -113,7 +115,7 @@ class RefillPhone extends refill\IRefillPhone
|
|
|
return 0;
|
|
|
} elseif ($card_type == mtopcard\ChinaUnicomCard) {
|
|
|
return 1;
|
|
|
- } elseif ($card_type == mtopcard\ChinaTelecomCard) {
|
|
|
+ } else { // ($card_type == mtopcard\ChinaTelecomCard)
|
|
|
return 2;
|
|
|
}
|
|
|
}
|