Skip to content

Commit 1efec6b

Browse files
committed
格式化代码
1 parent 5c78a11 commit 1efec6b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,9 @@ public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws W
196196
}
197197

198198
Map<String, String> payInfo = new HashMap<>();
199-
if ("NATIVE".equals(request.getTradeType()))
200-
{
199+
if ("NATIVE".equals(request.getTradeType())) {
201200
payInfo.put("codeUrl", unifiedOrderResult.getCodeURL());
202-
}else if ("APP".equals(request.getTradeType())){
201+
} else if ("APP".equals(request.getTradeType())) {
203202
// APP支付绑定的是微信开放平台上的账号,APPID为开放平台上绑定APP后发放的参数
204203
String appId = getConfig().getAppId();
205204
Map<String, String> configMap = new HashMap<>();
@@ -219,7 +218,7 @@ public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws W
219218
payInfo.put("packageValue", "Sign=WXPay");
220219
payInfo.put("timeStamp", String.valueOf(System.currentTimeMillis() / 1000));
221220
payInfo.put("nonceStr", String.valueOf(System.currentTimeMillis()));
222-
}else if ("JSAPI".equals(request.getTradeType())){
221+
} else if ("JSAPI".equals(request.getTradeType())) {
223222
payInfo.put("appId", unifiedOrderResult.getAppid());
224223
// 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
225224
payInfo.put("timeStamp", String.valueOf(System.currentTimeMillis() / 1000));

0 commit comments

Comments
 (0)