Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Aunero opened this issue Mar 13, 2023 · 7 comments
Closed

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

Aunero opened this issue Mar 13, 2023 · 7 comments

Comments

@Aunero
Copy link

Aunero commented Mar 13, 2023

Environment 环境

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

Bug Info

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

@AutisticShark
Copy link

易支付回调return报错500

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

订单管理显示待支付

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

@Aunero
Copy link
Author

Aunero commented Mar 13, 2023

易支付回调return报错500

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

订单管理显示待支付

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

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

@AutisticShark
Copy link

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

@Aunero
Copy link
Author

Aunero commented Mar 13, 2023

開 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
Copy link

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

@Aunero
Copy link
Author

Aunero commented Mar 13, 2023

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

可以了,谢谢大佬

@AutisticShark
Copy link

Fixed in 452a59f .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants