ayHaru 4 роки тому
батько
коміт
5cd939b630
2 змінених файлів з 13 додано та 5 видалено
  1. 1 0
      admin/control/merchant.php
  2. 12 5
      helper/refill/RefillFactory.php

+ 1 - 0
admin/control/merchant.php

@@ -30,6 +30,7 @@ class merchantControl extends SystemControl
         $lang = Language::getLangContent();
         $model_merchant = Model('merchant');
 
+        $condition['inner_status'] = 0;
         if (trim($_GET['merchant_name']) != '') {
             $condition['name'] = ['like', '%' . $_GET['merchant_name'] . '%'];
             Tpl::output('merchant_name', $_GET['merchant_name']);

+ 12 - 5
helper/refill/RefillFactory.php

@@ -534,14 +534,21 @@ class RefillFactory
         };
 
         $provider = $finder($chname, $card_type);
-        [$state, $err] = $provider->query($refill_info);
-
-        if(!$provider->callback()) {
-
-        }
+        [$state, $order_state] = $provider->query($refill_info);
 
         if ($state === true) {
             $mod_refill->edit($order_id, ['notify_time' => time(), 'notify_state' => 1]);
+            if(!$provider->callback()) {
+                $logic_vr_order = Logic("vr_order");
+                if ($order_state == ORDER_STATE_SUCCESS) {
+                    $logic_vr_order->changeOrderStateSuccess($order_id);
+                } elseif ($order_state == ORDER_STATE_CANCEL) {
+                    $mod_order = Model('vr_order');
+                    $order_info = $mod_order->getOrderInfo(['order_id' => $order_id]);
+
+                    $logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口查询通知失败,不可重试.");
+                }
+            }
             QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id]);
             return true;
         } else {