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

开放平台自动回复出错,提示“该服务号暂时无法提供服务” #654

Closed
rooyzhang opened this issue Apr 16, 2017 · 4 comments

Comments

@rooyzhang
Copy link

我用的环境

PHP 版本:5.6.30
overtrue/wechat 版本:3.3.1

问题及现象

开放平台自动回复出错,提示“该服务号暂时无法提供服务”,断点到/overtrue/wechat/src/Encryption/Encryptor.php里,发现执行到

$encrypted = openssl_encrypt($text, 'aes-256-cbc', $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING, $iv);

就执行不下去了。替换成官方的demo里的代码(如下),可以正常返回。


$module = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');

mcrypt_generic_init($module, $key, $iv);

$encrypted = mcrypt_generic($module, $text);

mcrypt_generic_deinit($module);

mcrypt_module_close($module);
@overtrue
Copy link
Collaborator

@mingyoung 这是不是上回我们讨论的那个问题

@mingyoung
Copy link
Collaborator

@overtrue 小程序解密错误那个问题?

@overtrue
Copy link
Collaborator

@mingyoung

@mingyoung
Copy link
Collaborator

@overtrue 应该不是

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

3 participants