feat: 新增充值订单独立管理模块及退款安全拦截
- 新增充值订单菜单及独立路由 - 禁用通用退款入口处理充值订单 - 完善支付场景类型及状态显示 - 补充充值退款测试用例 - 优化各模块未知状态显示提示 - 升级版本号至1.0.94
这个提交包含在:
@@ -77,6 +77,7 @@ class Invoice extends Backend
|
||||
}
|
||||
$linkedOrders = InvoiceService::fetchLinkedOrders((string)$row['order_ids'], (int)$row['id']);
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('invoiceIsImage', $this->isInvoiceImage((string)$row['invoice_file']));
|
||||
$this->view->assign('linkedOrders', $linkedOrders);
|
||||
$this->view->assign('flowOptions', []);
|
||||
return $this->view->fetch('edit');
|
||||
@@ -94,6 +95,7 @@ class Invoice extends Backend
|
||||
if (false === $this->request->isPost()) {
|
||||
$linkedOrders = InvoiceService::fetchLinkedOrders((string)$row['order_ids'], (int)$row['id']);
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('invoiceIsImage', $this->isInvoiceImage((string)$row['invoice_file']));
|
||||
$this->view->assign('linkedOrders', $linkedOrders);
|
||||
$this->view->assign('flowOptions', $this->statusFlow[$row['status']] ?? []);
|
||||
return $this->view->fetch();
|
||||
@@ -169,6 +171,14 @@ class Invoice extends Backend
|
||||
$this->success();
|
||||
}
|
||||
|
||||
/** 判断发票附件是否为可直接显示的图片,忽略 URL 查询参数。 */
|
||||
protected function isInvoiceImage($file)
|
||||
{
|
||||
$path = parse_url($file, PHP_URL_PATH);
|
||||
$extension = strtolower(pathinfo(is_string($path) ? $path : '', PATHINFO_EXTENSION));
|
||||
return in_array($extension, ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开票申请仅由用户/商户端发起,禁止后台手工添加
|
||||
*/
|
||||
|
||||
在新工单中引用
屏蔽一个用户