|
@ -81,7 +81,7 @@ public class WxPayController extends AbstractWxPayApiController { |
|
|
@Resource |
|
|
@Resource |
|
|
private SysAppletSetMapper appletSetMapper; |
|
|
private SysAppletSetMapper appletSetMapper; |
|
|
|
|
|
|
|
|
// private String notifyUrl = "http://java.chengguo.link:8081/api";
|
|
|
// private String notifyUrl = "http://java.chengguo.link:8081/api";
|
|
|
@Value("${wx.notifyUrl}") |
|
|
@Value("${wx.notifyUrl}") |
|
|
private String notifyUrl; |
|
|
private String notifyUrl; |
|
|
private String refundNotifyUrl; |
|
|
private String refundNotifyUrl; |
|
@ -287,8 +287,8 @@ public class WxPayController extends AbstractWxPayApiController { |
|
|
String ip = IpKit.getRealIp(request); |
|
|
String ip = IpKit.getRealIp(request); |
|
|
if (StrUtil.isEmpty(ip)) { |
|
|
if (StrUtil.isEmpty(ip)) { |
|
|
ip = "127.0.0.1"; |
|
|
ip = "127.0.0.1"; |
|
|
}else { |
|
|
} else { |
|
|
ip=ip.split(",")[0]; |
|
|
ip = ip.split(",")[0]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
OmsOrder orderInfo = orderService.getById(orderId); |
|
|
OmsOrder orderInfo = orderService.getById(orderId); |
|
@ -341,7 +341,7 @@ public class WxPayController extends AbstractWxPayApiController { |
|
|
Map<String, String> packageParams = WxPayKit.prepayIdCreateSign(prepayId, wxPayApiConfig.getAppId(), |
|
|
Map<String, String> packageParams = WxPayKit.prepayIdCreateSign(prepayId, wxPayApiConfig.getAppId(), |
|
|
wxPayApiConfig.getPartnerKey(), SignType.HMACSHA256); |
|
|
wxPayApiConfig.getPartnerKey(), SignType.HMACSHA256); |
|
|
|
|
|
|
|
|
// String jsonStr = JSON.toJSONString(packageParams);
|
|
|
// String jsonStr = JSON.toJSONString(packageParams);
|
|
|
return new CommonResult().success(packageParams); |
|
|
return new CommonResult().success(packageParams); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
@ -1027,4 +1027,23 @@ public class WxPayController extends AbstractWxPayApiController { |
|
|
} |
|
|
} |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
|
Map<String, String> params = RefundModel.builder() |
|
|
|
|
|
.appid("wxa66597d50184d027") |
|
|
|
|
|
.mch_id("1513840821") |
|
|
|
|
|
.nonce_str(WxPayKit.generateStr()) |
|
|
|
|
|
// .transaction_id("")
|
|
|
|
|
|
.out_trade_no("16802424046770100382") |
|
|
|
|
|
// .out_refund_no(WxPayKit.generateStr())
|
|
|
|
|
|
// .total_fee("2")
|
|
|
|
|
|
// .refund_fee("2")
|
|
|
|
|
|
// .notify_url("http://kfgiis.natappfree.cc/api/wxPay/refundNotify")
|
|
|
|
|
|
.build() |
|
|
|
|
|
.createSign("381f9ea3359c0e2fc8b74c59d9d9bb11", SignType.MD5); |
|
|
|
|
|
String b = WxPayApi.orderQuery(params); |
|
|
|
|
|
System.out.println("b==================:"+b); |
|
|
|
|
|
// String a = WxPayApi.orderRefund(false, params, "","1513840821");
|
|
|
|
|
|
// System.out.println("a================="+a);
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|