Commit f1c1e5c9 authored by hezhen's avatar hezhen

123

parent 1c650edf
...@@ -18,8 +18,7 @@ ACCESSKEYSECRET=OCKDEiwKGjePCZgPeWMEUFGwGbKYLA ...@@ -18,8 +18,7 @@ ACCESSKEYSECRET=OCKDEiwKGjePCZgPeWMEUFGwGbKYLA
TEMPLATECODE=SMS_170070101 TEMPLATECODE=SMS_170070101
SIGNNAME=滴房车 SIGNNAME=滴房车
#微信支付配置 #微信支付配置
WINXIN_AppID=wxcc2c9b7c87439a6d WINXIN_AppID=wx425608b69a34736f
WINXIN_AppSecret=279796e8c2963c8a5ddc8270ef642b29
WINXIN_PARTNER_KEY=xxfcXXDfangche74upyuns3AD4334533 WINXIN_PARTNER_KEY=xxfcXXDfangche74upyuns3AD4334533
WINXIN_PARTNER=1539689201 WINXIN_PARTNER=1539689201
#ios #ios
......
...@@ -34,7 +34,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -34,7 +34,7 @@ import com.alibaba.fastjson.JSONObject;
@Slf4j @Slf4j
public class WXPay { public class WXPay {
/** /**
* 公众号支付 * JSAPI支付
* @param total_fee * @param total_fee
* @param body * @param body
* @param notify_url * @param notify_url
......
...@@ -228,7 +228,7 @@ public class WXPrepay { ...@@ -228,7 +228,7 @@ public class WXPrepay {
treeMap.put("total_fee", this.total_fee); treeMap.put("total_fee", this.total_fee);
treeMap.put("spbill_create_ip", this.spbill_create_ip); treeMap.put("spbill_create_ip", this.spbill_create_ip);
treeMap.put("trade_type", this.trade_type); treeMap.put("trade_type", this.trade_type);
treeMap.put("sub_openid", this.openid); treeMap.put("openid", this.openid);
treeMap.put("notify_url", this.notify_url); treeMap.put("notify_url", this.notify_url);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
......
...@@ -66,8 +66,14 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> { ...@@ -66,8 +66,14 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
if(amount <= 0) { if(amount <= 0) {
amount = 1; amount = 1;
} }
Integer type=orderPayVo.getType();
String jsParam = WXPay.apppay(amount+"",orderPayVo.getBody(),"https://"+ SystemConfig.weixinHost+"/api/universal/pay/app/unauth/notify" ,trade_no,orderPayVo.getBuyerIp(),0); String jsParam="";
String notify_url="https://"+ SystemConfig.weixinHost+"/api/universal/pay/app/unauth/notify";
if(type!=null&&type==2){
jsParam=WXPay.webPay( amount+"",orderPayVo.getBody(),notify_url,trade_no,orderPayVo.getBuyerIp(), orderPayVo.getBuyerAccount());
}else {
jsParam = WXPay.apppay(amount+"",orderPayVo.getBody(),notify_url ,trade_no,orderPayVo.getBuyerIp(),0);
}
log.info("报名费回调路径jsParam:"+jsParam); log.info("报名费回调路径jsParam:"+jsParam);
if(!StringUtils.isBlank(jsParam)) if(!StringUtils.isBlank(jsParam))
{ {
...@@ -111,7 +117,8 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> { ...@@ -111,7 +117,8 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
OrderPay pay= list.get(0); OrderPay pay= list.get(0);
if(StringUtils.isNotBlank(pay.getNotifyUrl())){ if(StringUtils.isNotBlank(pay.getNotifyUrl())){
String url=pay.getNotifyUrl(); String url=pay.getNotifyUrl();
url+="&tradeNo="+orderNo; Integer type=pay.getType()==null?1:pay.getType();
url+="&tradeNo="+orderNo+"&type="+type;
log.error("---支付回调处理---orderNo======="+orderNo+"----notifyUrl===="+url); log.error("---支付回调处理---orderNo======="+orderNo+"----notifyUrl===="+url);
String result=""; String result="";
if(url.contains("https")||url.contains("HTTPS")){ if(url.contains("https")||url.contains("HTTPS")){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment