Commit 18043c63 authored by wanjilong's avatar wanjilong

add: 增加微信手续费0的兼容

parent 03804e85
...@@ -42,7 +42,7 @@ class RefundService ...@@ -42,7 +42,7 @@ class RefundService
throw new RefundException(['cus' => 2]); throw new RefundException(['cus' => 2]);
} }
if(empty($ret['result']['user_id'] != $user_id)) { if(empty($ret['result']['user_id']) || $ret['result']['user_id'] != $user_id) {
throw new RefundException(['cus' => 3]); throw new RefundException(['cus' => 3]);
} }
...@@ -193,10 +193,11 @@ class RefundService ...@@ -193,10 +193,11 @@ class RefundService
$pay_order = PayOrder::getMaster('*', ['order_id'=>$where['order_id']]); $pay_order = PayOrder::getMaster('*', ['order_id'=>$where['order_id']]);
// 总共手续费 // 总共手续费
$wx_tip = PayOrderClearing::getMaster('*', [ $wx_clear = PayOrderClearing::getMaster('*', [
'order_id'=>$where['order_id'], 'order_id'=>$where['order_id'],
'pay_order_id'=>$pay_order['pay_order_id'], 'pay_order_id'=>$pay_order['pay_order_id'],
'pay_type'=>Dictionary::PAY_TYPE_IN] 'pay_type'=>406 //三方渠道手续费
]
); );
// 计算已退金额、已退手续费 // 计算已退金额、已退手续费
...@@ -210,7 +211,12 @@ class RefundService ...@@ -210,7 +211,12 @@ class RefundService
$cleared_tip += $r['refund_wx_tip']; $cleared_tip += $r['refund_wx_tip'];
} }
$wx_tip = Strategy::getWxTip($order_item['payment'], $pay_order['pay_amount'], $cleared_amount, $wx_tip['pay_amount'], $cleared_tip); $wx_total_tip = 0;
if($wx_clear) {
$wx_total_tip = $wx_clear['pay_amount'];
}
$wx_tip = Strategy::getWxTip($order_item['payment'], $pay_order['pay_amount'], $cleared_amount, $wx_total_tip, $cleared_tip);
$edit = [ $edit = [
'refund_order_status'=>Dictionary::REFUND_ORDER_STATUS_SEND, 'refund_order_status'=>Dictionary::REFUND_ORDER_STATUS_SEND,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment