|
@@ -90,11 +90,30 @@ class RefillBase
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- private function risksn_check($refill_info,$org_official_sn)
|
|
|
+ private function risksn_check($refill_info, $order_info, $org_official_sn)
|
|
|
{
|
|
|
+ $in_exclude = function ($store_id)
|
|
|
+ {
|
|
|
+ $store_id = intval($store_id);
|
|
|
+ if($store_id <= 0) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ global $config;
|
|
|
+ $risk_official_sn = $config['risk_official_sn'] ?? [];
|
|
|
+ $exclude_stores = $risk_official_sn['exclude_stores'] ?? [];
|
|
|
+
|
|
|
+ return in_array($store_id,$exclude_stores);
|
|
|
+ };
|
|
|
+
|
|
|
$card_type = intval($refill_info['card_type']);
|
|
|
$chk_types = [mtopcard\ChinaMobileCard , mtopcard\ChinaUnicomCard , mtopcard\ChinaTelecomCard];
|
|
|
|
|
|
+ $store_id = intval($order_info['store_id']);
|
|
|
+ if($in_exclude($store_id)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if(!in_array($card_type,$chk_types)) {
|
|
|
return false;
|
|
|
}
|
|
@@ -191,7 +210,7 @@ class RefillBase
|
|
|
'order_id' => $refill_info['order_id'],
|
|
|
'official_sn' => $refill_info['official_sn']];
|
|
|
|
|
|
- if ($this->risksn_check($refill_info, $official_sn)) {
|
|
|
+ if ($this->risksn_check($refill_info, $order_info, $official_sn)) {
|
|
|
$tran->commit();
|
|
|
QueueClient::async_push("OnRiskSN", $params, 1);
|
|
|
return false;
|