stanley-king 1 ano atrás
pai
commit
1efea803ff
1 arquivos alterados com 9 adições e 0 exclusões
  1. 9 0
      rdispatcher/proxy.php

+ 9 - 0
rdispatcher/proxy.php

@@ -385,6 +385,10 @@ class proxy
         $order = refill\order::from_parameters($params);
         $need_callback = !$order->first_commit();
 
+        if($order->is_black()) {
+            return $this->onEerror($order, $need_callback,'黑名单卡号');
+        }
+
         if($is_closed($order->pcode())) {
             return $this->onEerror($order, $need_callback,"{$order->pcode()} has closed.");
         }
@@ -397,6 +401,11 @@ class proxy
         refill\util::push_queue_order($mchid,$mch_order,ORDER_STATE_SEND);
         $mod_refill->partition(util::part_refill($order_time))->edit_detail($mchid,$mch_order,['order_state' => ORDER_STATE_SEND]);
 
+        if ($this->canceled($mchid, $mch_order)) {
+            refill\util::del_cancel_order($mchid,$mch_order);
+            return $this->onEerror($order, $need_callback,'订单被拦截');
+        }
+
         $mch_amount = refill\RefillFactory::instance()->mch_amount($order);
         if ($mch_amount === false) {
             return $this->onEerror($order, $need_callback,'没有协商商品购买价格.');