|
@@ -181,9 +181,6 @@ class RefillBase
|
|
if ($success) {
|
|
if ($success) {
|
|
$logic_vr_order->changeOrderStateSuccess($order_id,true);
|
|
$logic_vr_order->changeOrderStateSuccess($order_id,true);
|
|
$tran->commit();
|
|
$tran->commit();
|
|
-
|
|
|
|
- util::incr_notify($chname, $card_type, $spec, $quality, true);
|
|
|
|
- util::incr_user_success($mchid,$card_type, $spec,$quality);
|
|
|
|
util::onOrderSuccess($refill_info,$order_info);
|
|
util::onOrderSuccess($refill_info,$order_info);
|
|
util::monitor_callback($mchid, $spec,$card_type,$refill_info['mch_amount'], $refill_info['channel_amount'], true,$order_time);
|
|
util::monitor_callback($mchid, $spec,$card_type,$refill_info['mch_amount'], $refill_info['channel_amount'], true,$order_time);
|
|
}
|
|
}
|
|
@@ -193,10 +190,6 @@ class RefillBase
|
|
$mod_refill->edit($order_id, ['is_retrying' => 1,'notify_time' => time()]);
|
|
$mod_refill->edit($order_id, ['is_retrying' => 1,'notify_time' => time()]);
|
|
$tran->commit();
|
|
$tran->commit();
|
|
|
|
|
|
-
|
|
|
|
- util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
|
- util::incr_amount_lock($mchid,$card_type,$spec);
|
|
|
|
-
|
|
|
|
[$can_retry,$params] = $this->retry($refill_info, $order_info);
|
|
[$can_retry,$params] = $this->retry($refill_info, $order_info);
|
|
if ($can_retry)
|
|
if ($can_retry)
|
|
{
|
|
{
|
|
@@ -204,16 +197,11 @@ class RefillBase
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- util::incr_user_fail($mchid,$card_type, $spec,$quality);
|
|
|
|
util::monitor_callback($mchid, $spec, $card_type, $refill_info['mch_amount'], 0, false, $order_time);
|
|
util::monitor_callback($mchid, $spec, $card_type, $refill_info['mch_amount'], 0, false, $order_time);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
$logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,不可重试.",true,true);
|
|
$logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,不可重试.",true,true);
|
|
$tran->commit();
|
|
$tran->commit();
|
|
-
|
|
|
|
- util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
|
- util::incr_amount_lock($mchid,$card_type,$spec);
|
|
|
|
- util::incr_user_fail($mchid,$card_type, $spec,$quality);
|
|
|
|
util::monitor_callback($mchid, $spec, $card_type, $refill_info['mch_amount'], 0, false, $order_time);
|
|
util::monitor_callback($mchid, $spec, $card_type, $refill_info['mch_amount'], 0, false, $order_time);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -294,6 +282,8 @@ class RefillBase
|
|
$logic_vr_order = Logic("vr_order");
|
|
$logic_vr_order = Logic("vr_order");
|
|
$logic_vr_order->changeOrderStateSuccess($order_id,true);
|
|
$logic_vr_order->changeOrderStateSuccess($order_id,true);
|
|
$mod_refill->edit($order_id, ['commit_time' => time(),'notify_time' => time(), 'is_retrying' => 0,'notify_state' => 1]);
|
|
$mod_refill->edit($order_id, ['commit_time' => time(),'notify_time' => time(), 'is_retrying' => 0,'notify_state' => 1]);
|
|
|
|
+ util::monitor_callback($mchid, $order->spec(), $order->card_type(), $mch_amount, $channel_amount, true, $order->order_time());
|
|
|
|
+
|
|
return [true,$order_id,''];
|
|
return [true,$order_id,''];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -439,11 +429,7 @@ class RefillBase
|
|
$last_orderid = $order_id;
|
|
$last_orderid = $order_id;
|
|
if(!$order_success) continue;
|
|
if(!$order_success) continue;
|
|
|
|
|
|
- util::incr_commit_pre($channel_name, $order->card_type(), $order->spec(), $order->cur_quality());
|
|
|
|
- util::decr_amount_lock($mchid, $order->card_type(), $order->spec());
|
|
|
|
-
|
|
|
|
$start = microtime(true);
|
|
$start = microtime(true);
|
|
-
|
|
|
|
$net_errno = "";
|
|
$net_errno = "";
|
|
$params = $order->channel_params($order_id,$order_sn,$goods_id);
|
|
$params = $order->channel_params($order_id,$order_sn,$goods_id);
|
|
|
|
|
|
@@ -459,10 +445,9 @@ class RefillBase
|
|
{
|
|
{
|
|
$commit_time = time();
|
|
$commit_time = time();
|
|
$chfilters->add_channel($channel_name,true);
|
|
$chfilters->add_channel($channel_name,true);
|
|
- util::incr_commit($channel_name,$card_type,$spec,$quality,true);
|
|
|
|
- util::monitor_commit($channel_name, $spec, $card_type, $channel_amount,$commit_time);
|
|
|
|
- $trade_no = $errmsg;
|
|
|
|
|
|
+ util::monitor_commit($channel_name, $spec, $card_type, $channel_amount, $commit_time);
|
|
|
|
|
|
|
|
+ $trade_no = $errmsg;
|
|
$refill_type = $provider->refill_type();
|
|
$refill_type = $provider->refill_type();
|
|
if ($refill_type == 'api') {
|
|
if ($refill_type == 'api') {
|
|
$logic_vr_order = Logic("vr_order");
|
|
$logic_vr_order = Logic("vr_order");
|
|
@@ -505,9 +490,6 @@ class RefillBase
|
|
$net_errno = 0;
|
|
$net_errno = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- util::incr_commit($channel_name,$card_type,$spec,$order->cur_quality(),false);
|
|
|
|
- util::incr_amount_lock($mchid,$card_type,$spec);
|
|
|
|
-
|
|
|
|
Log::record("channel:{$channel_name} err:{$errmsg}");
|
|
Log::record("channel:{$channel_name} err:{$errmsg}");
|
|
$logic_vr_order = Logic("vr_order");
|
|
$logic_vr_order = Logic("vr_order");
|
|
$order_info = Model('vr_order')->getOrderInfo(['order_id' => $order_id]);
|
|
$order_info = Model('vr_order')->getOrderInfo(['order_id' => $order_id]);
|
|
@@ -517,7 +499,6 @@ class RefillBase
|
|
$errmsg = "{$errmsg}";
|
|
$errmsg = "{$errmsg}";
|
|
}
|
|
}
|
|
$mod_refill->edit($order_id, ['commit_time' => time(), 'err_msg' => $errmsg]);
|
|
$mod_refill->edit($order_id, ['commit_time' => time(), 'err_msg' => $errmsg]);
|
|
-// $mod_refill->edit($order_id, ['commit_time' => time(), 'notify_time' => time(), 'err_msg' => $errmsg]);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -528,7 +509,6 @@ class RefillBase
|
|
} else {
|
|
} else {
|
|
//订单创建失败,不需要再重试了,可能已经是数据库等系统错误
|
|
//订单创建失败,不需要再重试了,可能已经是数据库等系统错误
|
|
return [errcode::MERCHANT_REFILL_ERROR, "充值失败", $last_orderid, false, 0];
|
|
return [errcode::MERCHANT_REFILL_ERROR, "充值失败", $last_orderid, false, 0];
|
|
-// return [errcode::MERCHANT_REFILL_ERROR, "充值失败", $last_orderid, false, 'ORDER_CREATE_FAIL'];
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|