|
@@ -107,6 +107,10 @@ class RefillBase
|
|
|
}
|
|
|
|
|
|
$refill_info = $mod_refill->getOrderInfo(['order_id' => $order_id,'inner_status' => 0]);
|
|
|
+ if(empty($refill_info)) {
|
|
|
+ $tran->commit();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
$quality = intval($refill_info['quality']);
|
|
|
$card_type = intval($refill_info['card_type']);
|
|
@@ -122,20 +126,17 @@ class RefillBase
|
|
|
}
|
|
|
elseif ($can_try)
|
|
|
{
|
|
|
- if(!empty($refill_info))
|
|
|
+ util::add_exclude_channel($mchid,$mch_order,$card_type,$chname);
|
|
|
+ util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
+ util::incr_amount_lock($mchid,$card_type,$spec);
|
|
|
+
|
|
|
+ $logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,正在重试",true,true);
|
|
|
+ [$can_retry,$params] = $this->retry($refill_info, $order_info);
|
|
|
+ if ($can_retry)
|
|
|
{
|
|
|
- util::add_exclude_channel($mchid,$mch_order,$card_type,$chname);
|
|
|
- util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
- util::incr_amount_lock($mchid,$card_type,$spec);
|
|
|
-
|
|
|
- $logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,正在重试",true,true);
|
|
|
-
|
|
|
- [$can_retry,$params] = $this->retry($refill_info, $order_info);
|
|
|
- if ($can_retry)
|
|
|
- {
|
|
|
- $mod_refill->edit($order_id, ['is_retrying' => 1,'notify_time' => time()]);
|
|
|
- $tran->commit();
|
|
|
- util::push_add($params);
|
|
|
+ $mod_refill->edit($order_id, ['is_retrying' => 1,'notify_time' => time()]);
|
|
|
+ $tran->commit();
|
|
|
+ if(util::push_add($params)) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -143,7 +144,6 @@ class RefillBase
|
|
|
else {
|
|
|
util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
util::incr_amount_lock($mchid,$card_type,$spec);
|
|
|
-
|
|
|
$logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,不可重试.",true,true);
|
|
|
}
|
|
|
$tran->commit();
|
|
@@ -153,7 +153,7 @@ class RefillBase
|
|
|
Log::record("Error:" . $ex->getMessage(), Log::ERR);
|
|
|
}
|
|
|
|
|
|
- $mod_refill->edit($order_id, ['notify_time' => time(), 'notify_state' => 1]);
|
|
|
+ $mod_refill->edit($order_id, ['notify_time' => time(), 'is_retrying' => 0,'notify_state' => 1]);
|
|
|
util::pop_queue_order($mchid,$mch_order);
|
|
|
QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id,'manual' => false]);
|
|
|
util::del_exclude_channel($mchid,$mch_order,$card_type);
|