| @@ -1,15 +1,66 @@ | |||
| package com.github.binarywang.wxpay.service.impl; | |||
| import java.io.File; | |||
| import java.io.IOException; | |||
| import java.nio.charset.StandardCharsets; | |||
| import java.nio.file.Files; | |||
| import java.nio.file.Path; | |||
| import java.nio.file.Paths; | |||
| import java.util.Date; | |||
| import java.util.HashMap; | |||
| import java.util.LinkedList; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.zip.ZipException; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import com.github.binarywang.utils.qrcode.QrcodeUtils; | |||
| import com.github.binarywang.wxpay.bean.WxPayApiData; | |||
| import com.github.binarywang.wxpay.bean.coupon.*; | |||
| import com.github.binarywang.wxpay.bean.coupon.WxPayCouponInfoQueryRequest; | |||
| import com.github.binarywang.wxpay.bean.coupon.WxPayCouponInfoQueryResult; | |||
| import com.github.binarywang.wxpay.bean.coupon.WxPayCouponSendRequest; | |||
| import com.github.binarywang.wxpay.bean.coupon.WxPayCouponSendResult; | |||
| import com.github.binarywang.wxpay.bean.coupon.WxPayCouponStockQueryRequest; | |||
| import com.github.binarywang.wxpay.bean.coupon.WxPayCouponStockQueryResult; | |||
| import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; | |||
| import com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyResult; | |||
| import com.github.binarywang.wxpay.bean.order.WxPayAppOrderResult; | |||
| import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; | |||
| import com.github.binarywang.wxpay.bean.order.WxPayNativeOrderResult; | |||
| import com.github.binarywang.wxpay.bean.request.*; | |||
| import com.github.binarywang.wxpay.bean.result.*; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayAuthcode2OpenidRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayDefaultRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayDownloadBillRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayMicropayRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayOrderCloseRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayOrderQueryRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayOrderReverseRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayQueryCommentRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayRedpackQueryRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayRefundQueryRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayReportRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPaySendRedpackRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayShorturlRequest; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; | |||
| import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayAuthcode2OpenidResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayBillBaseResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayBillResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayCommonResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayMicropayResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayOrderCloseResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayOrderReverseResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayRedpackQueryResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayRefundQueryResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayRefundResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPaySandboxSignKeyResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPaySendRedpackResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayShorturlResult; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult; | |||
| import com.github.binarywang.wxpay.config.WxPayConfig; | |||
| import com.github.binarywang.wxpay.constant.WxPayConstants.BillType; | |||
| import com.github.binarywang.wxpay.constant.WxPayConstants.SignType; | |||
| @@ -21,18 +72,6 @@ import com.github.binarywang.wxpay.util.SignUtils; | |||
| import com.google.common.base.Joiner; | |||
| import com.google.common.collect.Maps; | |||
| import jodd.io.ZipUtil; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import java.io.File; | |||
| import java.io.IOException; | |||
| import java.nio.charset.StandardCharsets; | |||
| import java.nio.file.Files; | |||
| import java.nio.file.Path; | |||
| import java.nio.file.Paths; | |||
| import java.util.*; | |||
| import java.util.zip.ZipException; | |||
| import static com.github.binarywang.wxpay.constant.WxPayConstants.QUERY_COMMENT_DATE_FORMAT; | |||
| import static com.github.binarywang.wxpay.constant.WxPayConstants.TarType; | |||
| @@ -125,7 +164,7 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { | |||
| log.debug("微信支付异步通知请求参数:{}", xmlData); | |||
| WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); | |||
| log.debug("微信支付异步通知请求解析后的对象:{}", result); | |||
| result.checkResult(this, null, false); | |||
| result.checkResult(this, this.getConfig().getSignType(), false); | |||
| return result; | |||
| } catch (WxPayException e) { | |||
| log.error(e.getMessage(), e); | |||