|
@@ -112,6 +112,8 @@ class RefillBase
|
|
|
if(!empty($refill_info))
|
|
|
{
|
|
|
util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
+ util::decr_amount_lock($refill_info['mchiid'],$card_type,$refill_info['refill_amount']);
|
|
|
+
|
|
|
$logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,正在重试");
|
|
|
|
|
|
[$can_retry,$params] = $this->retry($refill_info, $order_info);
|
|
@@ -132,6 +134,8 @@ class RefillBase
|
|
|
}
|
|
|
else {
|
|
|
util::incr_notify($chname, $card_type, $spec, $quality, false);
|
|
|
+ util::decr_amount_lock($refill_info['mchiid'],$card_type,$refill_info['refill_amount']);
|
|
|
+
|
|
|
$logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,不可重试.");
|
|
|
}
|
|
|
$tran->commit();
|
|
@@ -349,6 +353,7 @@ class RefillBase
|
|
|
{
|
|
|
//提交成功
|
|
|
util::incr_commit($channel_name,$card_type,$amount,$quality,true);
|
|
|
+ util::incr_amount_lock($mchid,$card_type,$amount);
|
|
|
$trade_no = $errmsg;
|
|
|
if ($provider->refill_type() == 'api') {
|
|
|
$logic_vr_order = Logic("vr_order");
|
|
@@ -369,6 +374,8 @@ class RefillBase
|
|
|
else {
|
|
|
//提交失败
|
|
|
util::incr_commit($channel_name,$card_type,$amount,$quality,false);
|
|
|
+ util::decr_amount_lock($mchid,$card_type,$amount);
|
|
|
+
|
|
|
Log::record("channel:{$channel_name} err:{$errmsg}");
|
|
|
$logic_vr_order = Logic("vr_order");
|
|
|
$order_info = Model('vr_order')->getOrderInfo(['order_id' => $order_id]);
|