mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-26 20:52:44 +08:00
Merge branch 'koogua/fix-wxpay' into demo
This commit is contained in:
commit
6b1f00e562
5
SECURITY.md
Normal file
5
SECURITY.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Please report security issues to `xiaochong0302@gmail.com`
|
@ -185,7 +185,12 @@ class Wxpay extends PayService
|
|||||||
|
|
||||||
if (!$trade) return false;
|
if (!$trade) return false;
|
||||||
|
|
||||||
if ($data->total_fee != 100 * $trade->amount) {
|
/**
|
||||||
|
* 注意浮点数精度丢失问题
|
||||||
|
*/
|
||||||
|
$amount = intval(strval(100 * $trade->amount));
|
||||||
|
|
||||||
|
if ($data->total_fee != $amount) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user