|
|
|
@@ -102,9 +102,10 @@ public class TtPayController extends BaseController { |
|
|
|
String appid; |
|
|
|
WxAppinfo appinfo; |
|
|
|
WxPayAccount payAccount; |
|
|
|
String out_order_no; |
|
|
|
Boolean is2_0 = false; |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(version) && "2.0".equals(version)){//支付2.0 回调 |
|
|
|
is2_0 = true; |
|
|
|
String msgSignature = request.getHeader("Byte-Signature"); |
|
|
|
String timestamp = request.getHeader("Byte-Timestamp"); |
|
|
|
String nonce = request.getHeader("Byte-Nonce-Str"); |
|
|
|
@@ -126,7 +127,6 @@ public class TtPayController extends BaseController { |
|
|
|
} |
|
|
|
logger.info("抖音通知(2.0)-----{}签名效验成功"); |
|
|
|
|
|
|
|
out_order_no = (String)pMap.get("out_order_no"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
String msgSignature = (String) parameterMap.get("msg_signature"); |
|
|
|
@@ -150,11 +150,16 @@ public class TtPayController extends BaseController { |
|
|
|
} |
|
|
|
logger.info("抖音通知-----{}签名效验成功"); |
|
|
|
|
|
|
|
out_order_no = (String) pMap.get("cp_orderno"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if("payment".equals(type)){//支付回调 |
|
|
|
String out_order_no; |
|
|
|
if(is2_0){ |
|
|
|
out_order_no = (String)pMap.get("out_order_no"); |
|
|
|
}else{ |
|
|
|
out_order_no = (String) pMap.get("cp_orderno"); |
|
|
|
} |
|
|
|
String way = (String) pMap.get("way");//2-支付宝,1-微信 |
|
|
|
if (!StringUtils.isNotBlank(out_order_no)) { |
|
|
|
try { |
|
|
|
@@ -187,9 +192,17 @@ public class TtPayController extends BaseController { |
|
|
|
resultMap.put("err_no",0); |
|
|
|
resultMap.put("err_tips","success"); |
|
|
|
}else if("refund".equals(type)){//退款回调 |
|
|
|
String cp_refundno = (String) pMap.get("cp_refundno"); |
|
|
|
String status = (String) pMap.get("status"); |
|
|
|
Integer refund_amount = (Integer) pMap.get("refund_amount"); |
|
|
|
String cp_refundno,status; |
|
|
|
Integer refund_amount; |
|
|
|
if(is2_0){ |
|
|
|
cp_refundno = (String) pMap.get("out_refund_no"); |
|
|
|
status = (String) pMap.get("status"); |
|
|
|
refund_amount = (Integer) pMap.get("refund_total_amount"); |
|
|
|
}else{ |
|
|
|
cp_refundno = (String) pMap.get("cp_refundno"); |
|
|
|
status = (String) pMap.get("status"); |
|
|
|
refund_amount = (Integer) pMap.get("refund_amount"); |
|
|
|
} |
|
|
|
|
|
|
|
Map<String,String> map = new HashMap<>(); |
|
|
|
map.put("appid",appid); |
|
|
|
@@ -211,6 +224,8 @@ public class TtPayController extends BaseController { |
|
|
|
|
|
|
|
resultMap.put("err_no",0); |
|
|
|
resultMap.put("err_tips","success"); |
|
|
|
}else if("settle".equals(type)){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return resultMap; |
|
|
|
|