|
@@ -302,7 +302,7 @@ class RefillBase
|
|
|
foreach ($providers as $provider)
|
|
|
{
|
|
|
$channel_name = $provider->name();
|
|
|
- [$goods_id, $price] = $provider->goods($order->cur_quality(),$order->spec(),$order->card_type(),$order->region_no(),$order->thrid_params());
|
|
|
+ [$goods_id, $price] = $provider->goods($order->cur_quality(), $order->spec(), $order->card_type(), $order->region_no(), $order->thrid_params());
|
|
|
if ($goods_id <= 0) continue;
|
|
|
//非组合通道,以原始质量算价格. //通道价格大于客户价格,换通道.
|
|
|
if(PolicyUtil::mixed_quality($org_quality) == false && $price > $mch_price) {
|
|
@@ -311,7 +311,7 @@ class RefillBase
|
|
|
|
|
|
$mod_refill = Model('refill_order');
|
|
|
$channel_amount = $price * $order->quantity();
|
|
|
- [$order_success,$order_id,$order_sn] = $this->create_order($order,$goods_id,$minfo,$calc,$channel_name,$channel_amount,$mch_amount);
|
|
|
+ [$order_success, $order_id, $order_sn] = $this->create_order($order, $goods_id, $minfo, $calc, $channel_name, $channel_amount, $mch_amount);
|
|
|
$last_orderid = $order_id;
|
|
|
if(!$order_success) continue;
|
|
|
|
|
@@ -473,7 +473,7 @@ class RefillBase
|
|
|
$order_sn = $result['data']['order_sn'];
|
|
|
$order_id = $result['data']['order_id'];
|
|
|
$last_orderid = $order->last_order_id();
|
|
|
- $fSuccess = $refill_creater($order,$last_orderid,$order_id,$order_sn,$mod_refill);
|
|
|
+ $fSuccess = $refill_creater($order, $last_orderid, $order_id, $order_sn, $mod_refill);
|
|
|
|
|
|
if(!$fSuccess) {
|
|
|
Log::record("refill_creater fail:order_sn={$order_sn}",Log::ERR);
|
|
@@ -625,7 +625,6 @@ class RefillBase
|
|
|
$chname = $refill_info['channel_name'];
|
|
|
$mchid = $refill_info['mchid'];
|
|
|
$mch_order = $refill_info['mch_order'];
|
|
|
- $card_type = intval($refill_info['card_type']);
|
|
|
|
|
|
if($order_info['order_state'] == ORDER_STATE_PAY) {
|
|
|
$query_able = true;
|
|
@@ -649,11 +648,11 @@ class RefillBase
|
|
|
elseif($order_state == ORDER_STATE_SUCCESS || $order_state == ORDER_STATE_CANCEL)
|
|
|
{
|
|
|
$logic_vr_order = Logic("vr_order");
|
|
|
- $logic_vr_order->changeOrderStateSend($order_id,true);
|
|
|
+ $logic_vr_order->changeOrderStateSend($order_id, true);
|
|
|
|
|
|
$data = ['commit_time' => time()];
|
|
|
$mod_refill->edit($order_id, $data);
|
|
|
- QueueClient::async_push("QueryRefillState",['order_id' => $order_id],1);
|
|
|
+ QueueClient::async_push("QueryRefillState", ['order_id' => $order_id], 1);
|
|
|
}
|
|
|
elseif ($order_state == ORDER_STATE_NOEXIST) {
|
|
|
$logic_vr_order = Logic("vr_order");
|
|
@@ -661,7 +660,7 @@ class RefillBase
|
|
|
|
|
|
$mod_refill->edit($order_id, ['notify_time' => time(), 'notify_state' => 1]);
|
|
|
util::pop_queue_order($mchid,$mch_order);
|
|
|
- QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id,'manual' => false]);
|
|
|
+ QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => false]);
|
|
|
}
|
|
|
else {
|
|
|
QueueClient::async_push("QueryOrderNeterr",['order_id' => $order_id],30);
|