|
@@ -106,9 +106,15 @@ class RefillBase
|
|
|
if(!empty($refill_info))
|
|
|
{
|
|
|
$logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,正在重试");
|
|
|
- if ($this->retry($refill_info, $order_info)) {
|
|
|
+ $params = $this->retry($refill_info, $order_info);
|
|
|
+ if ($params !== false) {
|
|
|
$mod_refill->edit($order_id, ['is_retrying' => 1]);
|
|
|
$tran->commit();
|
|
|
+ if(defined('USE_COROUTINE') && USE_COROUTINE) {
|
|
|
+ \Swoole\Coroutine::sleep(2);
|
|
|
+ }
|
|
|
+
|
|
|
+ util::push_add($params);
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -156,7 +162,7 @@ class RefillBase
|
|
|
'order_id' => $refill_info['order_id']
|
|
|
];
|
|
|
|
|
|
- return util::push_add($params);
|
|
|
+ return $params;
|
|
|
}
|
|
|
|
|
|
public function zero_order($mchid, $buyer_id, $amount, $card_no,
|
|
@@ -223,8 +229,6 @@ class RefillBase
|
|
|
$card_type = mtopcard\card_type($card_no);
|
|
|
}
|
|
|
[$providers,$overload] = $this->mPolicy->find_providers($amount,$card_type,$quality);
|
|
|
- Log::record("RefillBase::add 1",Log::DEBUG);
|
|
|
-
|
|
|
|
|
|
if (empty($providers))
|
|
|
{
|
|
@@ -236,7 +240,7 @@ class RefillBase
|
|
|
return [errcode::CANNOT_MATCH_PROVIDER, "匹配不到合适的充值通道",$last_orderid,false];
|
|
|
}
|
|
|
}
|
|
|
- Log::record("RefillBase::add 2",Log::DEBUG);
|
|
|
+
|
|
|
if (empty($notify_url)) {
|
|
|
$notify_url = "";
|
|
|
}
|
|
@@ -244,14 +248,12 @@ class RefillBase
|
|
|
$minfo = new member_info($buyer_id);
|
|
|
$calc = new CalcMerchantPrice($mchid, $amount, $card_type,$quality);
|
|
|
$mch_amount = $calc->calc_vgoods_price([]);
|
|
|
- Log::record("RefillBase::add 3",Log::DEBUG);
|
|
|
|
|
|
$available = $minfo->available_predeposit();
|
|
|
if ($mch_amount > $available) {
|
|
|
Log::record("下单时机构余额不足,可用余额为:{$available}", Log::DEBUG);
|
|
|
return [errcode::MERCHANT_SHORT_MONEY, "余额不足支付订单",$last_orderid,false];
|
|
|
}
|
|
|
- Log::record("RefillBase::add 4",Log::DEBUG);
|
|
|
|
|
|
$refill_state = false;
|
|
|
$order_success = false;
|