Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1, 官方签发的应用证书在
-----END CERTIFICATE-----
前可能存在换行,导致 phpopenssl_x509_parse
函数无法识别证书内容,提交请求时支付宝回复”应用公钥证书不存在“错误。新增清理无用空行函数,并在读取证书时应用,以解决该问题;2,
AntCertificationUtil->hex2dec()
方法可能因为用户应用在其他位置修改了 bcscale 精度而导致返回值存在多余的小数位0。我所遭遇的情况更神奇:因为测试环境配置问题 php-fpm 没能及时重启进程,当请求分配到不同的 php 进程上时 bcscale 返回都不同。新增在 hex2dec 函数内强制配置 bcscale 为0 ,并在执行完后恢复用户之前的 scale 值,顺利解决这个问题;