【类 型】:fix

【原  因】:值判断了商品总价 (打包费 运费后加字段)
【过  程】:客户申请金额超额判断 :申请金额<商品总价+打包费+运费
【影  响】:
This commit is contained in:
air 2025-01-15 17:14:25 +08:00
parent dc71d7c6d5
commit edb518f552

View File

@ -64,13 +64,13 @@ class PayController extends PublicController
// 获取订单信息
$where['shop_id'] = $_REQUEST['shop_id'];
$where['order_sn'] = $_REQUEST['order_sn'];
$field = array('order_sn, total_price, pay_sn,main_status,shop_id');
$field = array('order_sn, total_price,transport_price,pack_price, pay_sn,main_status,shop_id');
$orderDb = D('order');
if (!$order = $orderDb->where($where)->field($field)->find()) {
echo json_encode(array('status' => 0, 'msg' => '订单不存在'));
exit();
}
if ($order['total_price'] < $_REQUEST['refund_price']) {
if (($order['total_price'] + $order['transport_price'] + $order['pack_price']) < $_REQUEST['refund_price']) {
echo json_encode(array('status' => 0, 'msg' => '退款申请超额'));
exit();
}