From b4714459a7a8960bcce7d7e86ea6ce3df1b45c8f Mon Sep 17 00:00:00 2001 From: devil Date: Sat, 22 Feb 2020 12:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=AF=E4=BB=98=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E7=B2=BE=E5=BA=A6=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/payment/BaiduMini.php | 2 +- extend/payment/QQ.php | 4 ++-- extend/payment/Weixin.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extend/payment/BaiduMini.php b/extend/payment/BaiduMini.php index 2cd5b67bb..1467a76d6 100644 --- a/extend/payment/BaiduMini.php +++ b/extend/payment/BaiduMini.php @@ -152,7 +152,7 @@ class BaiduMini $data = [ 'dealId' => $this->config['dealid'], 'appKey' => $this->config['appkey'], - 'totalAmount' => intval($params['total_price']*100), + 'totalAmount' => (int) (($params['total_price']*1000)/10), 'tpOrderId' => $params['order_no'], 'dealTitle' => $params['name'], 'signFieldsRange' => 1, diff --git a/extend/payment/QQ.php b/extend/payment/QQ.php index 1cbae53a3..47902c78a 100644 --- a/extend/payment/QQ.php +++ b/extend/payment/QQ.php @@ -293,7 +293,7 @@ class QQ 'notify_url' => $notify_url, 'out_trade_no' => $params['order_no'].GetNumberCode(6), 'fee_type' => 'CNY', - 'total_fee' => intval($params['total_price']*100), + 'total_fee' => (int) (($params['total_price']*1000)/10), 'spbill_create_ip' => GetClientIP(), 'trade_type' => $trade_type, 'attach' => empty($params['attach']) ? '订单号:'.$params['order_no'] : $params['attach'], @@ -414,7 +414,7 @@ class QQ 'nonce_str' => md5(time().rand().$params['order_no']), 'transaction_id' => $params['trade_no'], 'out_refund_no' => $params['order_no'].GetNumberCode(6), - 'refund_fee' => intval($params['refund_price']*100), + 'refund_fee' => (int) (($params['refund_price']*1000)/10), 'op_user_id' => $this->config['op_user_id'], 'op_user_passwd' => md5($this->config['op_user_passwd']), ]; diff --git a/extend/payment/Weixin.php b/extend/payment/Weixin.php index c0bd77c62..7949f5734 100755 --- a/extend/payment/Weixin.php +++ b/extend/payment/Weixin.php @@ -364,7 +364,7 @@ class Weixin 'openid' => ($trade_type == 'JSAPI') ? $openid : '', 'out_trade_no' => $params['order_no'].GetNumberCode(6), 'spbill_create_ip' => GetClientIP(), - 'total_fee' => intval($params['total_price']*100), + 'total_fee' => (int) (($params['total_price']*1000)/10), 'trade_type' => $trade_type, 'attach' => empty($params['attach']) ? $params['site_name'].'-'.$params['name'] : $params['attach'], 'sign_type' => 'MD5', @@ -513,8 +513,8 @@ class Weixin 'sign_type' => 'MD5', 'transaction_id' => $params['trade_no'], 'out_refund_no' => $params['order_no'].GetNumberCode(6), - 'total_fee' => intval($params['pay_price']*100), - 'refund_fee' => intval($params['refund_price']*100), + 'total_fee' => (int) (($params['pay_price']*1000)/10), + 'refund_fee' => (int) (($params['refund_price']*1000)/10), 'refund_desc' => $refund_reason, ]; $data['sign'] = $this->GetSign($data); -- GitLab