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);