| | |
| | | |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.ruoyi.common.core.utils.WebUtils; |
| | | import com.ruoyi.payment.wx.model.WxCloseOrderModel; |
| | | import com.ruoyi.payment.wx.model.WxPaymentInfoModel; |
| | | import com.ruoyi.payment.wx.model.WxPaymentRefundModel; |
| | | import com.ruoyi.payment.wx.resp.NotifyV3PayDecodeRespBody; |
| | |
| | | * @param mchid |
| | | * @return |
| | | */ |
| | | public abstract NotifyV3PayDecodeRespBody query(String out_trade_no, String mchid); |
| | | public abstract NotifyV3PayDecodeRespBody query(String out_trade_no); |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public abstract Map<String, Object> refund(WxPaymentRefundModel refundModel); |
| | | |
| | | |
| | | |
| | | public abstract String close(String out_trade_no); |
| | | |
| | | /** |
| | | * 订单退款 |
| | |
| | | writer.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 关闭订单 |
| | | * @param httpClient |
| | | * @param uri |
| | | * @param httpReadTimeoutMs |
| | | * @param httpConnectTimeoutMs |
| | | * @param closeModel |
| | | * @return |
| | | */ |
| | | public String close(CloseableHttpClient httpClient, |
| | | String uri, |
| | | int httpReadTimeoutMs, |
| | | int httpConnectTimeoutMs, |
| | | WxCloseOrderModel closeModel) { |
| | | String reqBody = WxJsonUtils.toJsonString(closeModel); |
| | | //请求URL |
| | | HttpEntityEnclosingRequestBase httpPost = requestPost( |
| | | uri |
| | | , httpReadTimeoutMs |
| | | , httpConnectTimeoutMs, reqBody); |
| | | String repBody = result(httpClient, httpPost); |
| | | return repBody; |
| | | } |
| | | |
| | | } |