【类 型】:fix 退款接口 订单状态检查bug

【原  因】:重新梳理逻辑
【过  程】:已发货得订单 判断前端传得参数 必须是以已送达 或者 未送达
【影  响】:
This commit is contained in:
tk 2024-08-06 18:52:45 +08:00
parent 7d1b0220f4
commit 7caafd41a0

View File

@ -71,9 +71,11 @@ class PayController extends PublicController
exit(); exit();
} }
//后端订单检查 //后端订单检查
if ($order['shipment_status'] == "已发货" && ($_REQUEST['refund_Shipment'] != "已送达" || $_REQUEST['refund_Shipment'] != "未送达")) { if ($order['shipment_status'] == "已发货") {
echo json_encode(array('status' => 0, 'msg' => '请确认货物状态')); if (!($_REQUEST['refund_Shipment'] == "已送达" || $_REQUEST['refund_Shipment'] == "未送达")) {
exit(); echo json_encode(array('status' => 0, 'msg' => '请确认货物状态'));
exit();
}
} }
if ($order['total_price'] < $_REQUEST['refund_price']) { if ($order['total_price'] < $_REQUEST['refund_price']) {
echo json_encode(array('status' => 0, 'msg' => '退款申请超额')); echo json_encode(array('status' => 0, 'msg' => '退款申请超额'));