-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix:修复值为0、'0'的参数会被过滤的问题 #2864
fix:修复值为0、'0'的参数会被过滤的问题 #2864
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/Pay/LegacySignature.php
Outdated
@@ -38,7 +38,9 @@ public function sign(array $params): array | |||
'sub_appid' => $params['sub_appid'] ?? null, | |||
], | |||
$params | |||
) | |||
), function ($value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议函数用 static fn ($value, $key) => !($key === 'sign' || $value === '' || is_null($value)) 一行搞定,要点是 static
会有一点点性能优势,$key
排除掉 sign
直白地说,在企业微信的4个接口里, |
比如医疗行业,有移动医保支付接口,会涉及到统筹金额、个账金额、现金金额这些,比如走纯自费,那么医保金额这些金额就是0 |
这个框架是非常好用的,可以直接对接这些非开放的接口,目前就是由于会自动去掉这些传0的字段导致出问题 |
我记得「医保混合支付」功能是定制化的 |
可能每个省份不一样,我这边还是v2的 |
v2版本有一些行业内接口,是需要传0的