浏览代码

fix bug 微信支付

skyline 2 年之前
父节点
当前提交
67e4086a47
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      service/src/main/java/com/kym/service/wechat/impl/WxPayServiceImpl.java

+ 1 - 1
service/src/main/java/com/kym/service/wechat/impl/WxPayServiceImpl.java

@@ -111,7 +111,7 @@ public class WxPayServiceImpl implements WxPayService {
         // request.setXxx(val)设置所需参数,具体参数可见Request定义
         PrepayRequest request = new PrepayRequest();
         Amount amount = new Amount();
-        amount.setTotal(rechargeAmount * 100);
+        amount.setTotal(rechargeAmount); // 传入金额单位为分
         request.setAmount(amount);
         request.setAppid(conf.getAppid());
         request.setMchid(conf.getMchid());