作者 耿培杰

修改退款接口提示语

... ... @@ -1526,7 +1526,7 @@ class Order extends Api
$wuliu = $kdniao->getOrderTracesByJson($company, $code);
$wuliu = json_decode($wuliu, true);
$wuliu = isset($wuliu['Traces']) && count($wuliu['Traces']) ? array_reverse($wuliu['Traces']) : [['AcceptStation' => '暂无物流信息', 'AcceptTime' => date('Y-m-d H:i:s', time())]];
$data['company_name'] = Db::name('kdniao')->where(['code' => $data['logistic_code']])->value('company');
$data['company_name'] = Db::name('kdniao')->where(['code' => $data['shipper_code']])->value('company');
$data['wuliu'] = $wuliu;
$this->success('SUCCESS', $data);
}
... ... @@ -1610,7 +1610,7 @@ class Order extends Api
$userModel = new \app\api\model\User();
if ($orderInfo['pay_type'] == 1){
//微信退款
$result = $pay->refundGoods($orderInfo['order_num'],$orderInfo['pay_total'],$orderInfo['id'],$refund_note,$orderInfo['goods_total']);
$result = $pay->refundGoods($order['order_num'],$orderInfo['pay_total'],$orderInfo['id'],$refund_note,$orderInfo['goods_total']);
}else{
//余额退款
$result = $userModel->refundGoods($orderInfo['user_id'],$orderInfo['goods_total'],$orderInfo['id'],$refund_note);
... ...
... ... @@ -95,7 +95,7 @@ class Pay extends Api
// 用户是否支付成功
if ($successful) {
$orderInfoModel = new OrderInfo();
$goodsList = $orderInfoModel->where('order_id', $order['id'])->field('goods_id,number,ch_goods_name,type,score')->select();
$goodsList = $orderInfoModel->where('order_id', $order['id'])->field('goods_id,number,ch_goods_name,type,score,depot_id')->select();
$orderModel->notify($order['id'],$order['user_id'],$order['pay_total'],$goodsList);
}
return true; // 返回处理完成
... ... @@ -216,7 +216,7 @@ class Pay extends Api
// $orderNo = "2020060610056519";//商户系统内部的订单号(out_trade_no)
$refundNo = get_order_num().'3';//退款单号
if ($refundFee){
$result = json_decode($payment->refund($orderNo, $refundNo, $total*100,$refundFee),true); // 总金额 100, 退款 80,refundFee可选(为空时全额退款)
$result = json_decode($payment->refund($orderNo, $refundNo, $total*100,$refundFee*100),true); // 总金额 100, 退款 80,refundFee可选(为空时全额退款)
}else {
$result = json_decode($payment->refund($orderNo, $refundNo, $total*100),true); // 总金额 100, 退款 80,refundFee可选(为空时全额退款)
}
... ... @@ -240,7 +240,7 @@ class Pay extends Api
// $orderNo = "2020060610056519";//商户系统内部的订单号(out_trade_no)
$refundNo = get_order_num().'3';//退款单号
if ($refundFee){
$result = json_decode($payment->refund($orderNo, $refundNo, $total*100,$refundFee),true); // 总金额 100, 退款 80,refundFee可选(为空时全额退款)
$result = json_decode($payment->refund($orderNo, $refundNo, $total*100,$refundFee*100),true); // 总金额 100, 退款 80,refundFee可选(为空时全额退款)
}else {
$result = json_decode($payment->refund($orderNo, $refundNo, $total*100),true); // 总金额 100, 退款 80,refundFee可选(为空时全额退款)
}
... ...
... ... @@ -463,7 +463,7 @@ class Order extends Model
$res1 = $orderInfoModel->where('id', $order_info_id)->update($data);
$res2 = $orderRefundModel->save($refundData);
$goods = $orderInfoModel->where('id', $order_info_id)->field('goods_id,depot_id,number,ch_goods_name,type,score')->select();
$goods = $orderInfoModel->where('id', $order_info_id)->field('goods_id,depot_id,number,ch_goods_name,type,score')->find();
Db::name('depot_goods')->where(['type' => $goods['type'], 'goods_id' => $goods['goods_id'], 'depot_id' => $goods['depot_id']])->setInc('stock_num', $goods['number']);
//判断商品类型减销量 加库存
if ($goods['type'] == 2) {
... ...