mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-05 01:24:25 +08:00
1. 完善易支付API调用全流程
2. 确定支付插件继承基础类和接口规范 3. 引入Yansongda\Pay支付快捷工具 4. 重新整理代码和功能结构
This commit is contained in:
@@ -22,7 +22,11 @@ class EpayController extends BaseController
|
||||
*/
|
||||
public function submit(Request $request)
|
||||
{
|
||||
$data = array_merge($request->get(), $request->post());
|
||||
$data = match ($request->method()) {
|
||||
'GET' => $request->get(),
|
||||
'POST' => $request->post(),
|
||||
default => array_merge($request->get(), $request->post()),
|
||||
};
|
||||
|
||||
try {
|
||||
// 参数校验(使用自定义 Validator + 场景)
|
||||
@@ -40,6 +44,9 @@ class EpayController extends BaseController
|
||||
}
|
||||
|
||||
if (($payParams['type'] ?? '') === 'form') {
|
||||
if (!empty($payParams['html'])) {
|
||||
return response($payParams['html'])->withHeaders(['Content-Type' => 'text/html; charset=UTF-8']);
|
||||
}
|
||||
return $this->renderForm($payParams);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user