|
|
@@ -506,6 +506,15 @@ public class WxPayBillServiceImpl implements WxPayBillService { |
|
|
public ResultData payBillClose(WxAppinfo appInfo, WxPayBill record) { |
|
|
public ResultData payBillClose(WxAppinfo appInfo, WxPayBill record) { |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
|
|
|
//关闭之前先查询 |
|
|
|
|
|
ResultData resultData = payBillQuery(appInfo, record); |
|
|
|
|
|
if(resultData.code == Result.SUCCESS) { |
|
|
|
|
|
Map<String, String> map = (Map) resultData.data; |
|
|
|
|
|
if("SUCCESS".equals(map.get("result_code")) && "SUCCESS".equals(map.get("trade_state"))){ |
|
|
|
|
|
return new ResultData(ErrorCode.ORDER_HAD_PAY); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
String response = wechatPayBillClose(appInfo, record); |
|
|
String response = wechatPayBillClose(appInfo, record); |
|
|
|
|
|
|
|
|
logger.info("pay bill close, " + record.toString() + ", response: " + response); |
|
|
logger.info("pay bill close, " + record.toString() + ", response: " + response); |
|
|
|