1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-26 12:23:06 +08:00

Merge branch 'koogua/fix-wxpay' into demo

This commit is contained in:
koogua 2021-09-17 10:06:40 +08:00
commit 6b1f00e562
2 changed files with 11 additions and 1 deletions

5
SECURITY.md Normal file
View File

@ -0,0 +1,5 @@
# Security Policy
## Reporting a Vulnerability
Please report security issues to `xiaochong0302@gmail.com`

View File

@ -185,7 +185,12 @@ class Wxpay extends PayService
if (!$trade) return false;
if ($data->total_fee != 100 * $trade->amount) {
/**
* 注意浮点数精度丢失问题
*/
$amount = intval(strval(100 * $trade->amount));
if ($data->total_fee != $amount) {
return false;
}