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

沙箱模式获取验签 key 时产生无限循环 , 无法正常获取 #1009

Closed
mugennsou opened this issue Nov 4, 2017 · 2 comments
Closed

Comments

@mugennsou
Copy link

mugennsou commented Nov 4, 2017

我用的环境

PHP 版本:7.11
overtrue/wechat 版本:4.0
是否使用了框架?框架名称:Laravel 5.5

问题及现象

@mingyoung

在沙箱模式下 , 文件 Payment\Kernel\BaseClient 代码 request() 方法第 80 行处 ,

        $params['sign'] = Support\generate_sign($params, $this->app->getKey());

对数据进行加签时 , 使用的 key 为 $this->app->getKey() , 该方法内部第 38 行会继续调用 BaseClient 的 request() 方法

        $response = $this->request('sandboxnew/pay/getsignkey');

导致在沙箱模式下无限请求 sandboxnew/pay/getsignkey ,无法正常获取到沙箱验签 key .

发起对 sandboxnew/pay/getsignkey 请求时应使用 $this->app['config']->key

@mingyoung
Copy link
Collaborator

Fixed: 535ca7b

@mugennsou
Copy link
Author

非常感谢.

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

No branches or pull requests

2 participants