Anankke / SSPanel-UIM

Multi-purpose proxy service management system
MIT License
9.4k stars 3.4k forks source link

[BUG]2022.12.1 新商店易支付回调报错500 #1817

Closed Aunero closed 1 year ago

Aunero commented 1 year ago

Environment 环境

OS: centos 7.9 PHP version: php8.1 DB version: mariaDB 10.7 Commit: #1815

Bug Info

易支付回调return报错500, 新商店账单管理显示已支付(支付网关), 订单管理显示待支付

AutisticShark commented 1 year ago

易支付回调return报错500

檢查是否正確執行DB遷移。

订单管理显示待支付

檢查 xcat Cron 定時任務是否正確配置。

Aunero commented 1 year ago

易支付回调return报错500

檢查是否正確執行DB遷移。

订单管理显示待支付

檢查 xcat Cron 定時任務是否正確配置。

数据库已更新到最新版本 2023030500, 但return还是会报错500 显示待支付的问题已经配置xcat Cron好了

AutisticShark commented 1 year ago

開 debug 看看回調的報錯内容。

Aunero commented 1 year ago

開 debug 看看回調的報錯内容。

Warning: Undefined array key "money" in /www/wwwroot/website/src/Services/Gateway/Epay.php on line 142 Slim Application Error The application could not run because of the following error:

Details Type: TypeError Code: 0 Message: App\Services\Payment::returnHTML(): Return value must be of type string, Slim\Http\Response returned File: /www/wwwroot/website/src/Services/Payment.php Line: 70 Trace

0 /www/wwwroot/website/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): App\Services\Payment::returnHTML()

1 /www/wwwroot/website/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke()

2 /www/wwwroot/website/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle()

3 /www/wwwroot/website/src/Middleware/Auth.php(28): Slim\MiddlewareDispatcher->handle()

4 /www/wwwroot/website/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): App\Middleware\Auth->process()

5 /www/wwwroot/website/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

6 /www/wwwroot/website/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle()

7 /www/wwwroot/website/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run()

8 /www/wwwroot/website/src/Middleware/ErrorHandler.php(28): Slim\Routing\RouteRunner->handle()

9 /www/wwwroot/website/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): App\Middleware\ErrorHandler->process()

10 /www/wwwroot/website/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

11 /www/wwwroot/website/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle()

12 /www/wwwroot/website/vendor/slim/slim/Slim/App.php(183): Slim\App->handle()

13 /www/wwwroot/website/public/index.php(40): Slim\App->run()

14 {main}

money参数我看到回调url上是有的

AutisticShark commented 1 year ago

src/Services/Payment.php 第 64 行 public static function returnHTML($request, $response, $args): string 改成 public static function returnHTML($request, $response, $args) 試試。

Aunero commented 1 year ago

src/Services/Payment.php 第 64 行 public static function returnHTML($request, $response, $args): string 改成 public static function returnHTML($request, $response, $args) 試試。

可以了,谢谢大佬

AutisticShark commented 1 year ago

Fixed in https://github.com/Anankke/SSPanel-Uim/commit/452a59f2fb95dd428e09dad5e627f9160d7ec9d0 .