支付回调调试
This commit is contained in:
parent
a2982000a6
commit
c1de717eaa
|
|
@ -18,6 +18,7 @@ import com.mdd.front.validate.PaymentValidate;
|
||||||
import com.mdd.front.vo.PayWayListedVo;
|
import com.mdd.front.vo.PayWayListedVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -27,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/pay")
|
@RequestMapping("/api/pay")
|
||||||
@Api(tags = "支付管理")
|
@Api(tags = "支付管理")
|
||||||
|
|
@ -100,10 +102,14 @@ public class PayController {
|
||||||
signatureHeader.setSerial(request.getHeader("wechatpay-serial"));
|
signatureHeader.setSerial(request.getHeader("wechatpay-serial"));
|
||||||
signatureHeader.setTimeStamp(request.getHeader("wechatpay-timestamp"));
|
signatureHeader.setTimeStamp(request.getHeader("wechatpay-timestamp"));
|
||||||
|
|
||||||
|
log.error("========================== 回调来了 ====================");
|
||||||
|
log.error("响应的: " + jsonData);
|
||||||
|
log.error("请求的: " + signatureHeader);
|
||||||
|
|
||||||
// 解密数据
|
// 解密数据
|
||||||
WxPayService wxPayService = WxPayDriver.handler(ClientEnum.MNP.getCode());
|
WxPayService wxPayService = WxPayDriver.handler(ClientEnum.MNP.getCode());
|
||||||
WxPayOrderNotifyV3Result.DecryptNotifyResult notifyResult = wxPayService.parseOrderNotifyV3Result(jsonData, signatureHeader).getResult();
|
WxPayOrderNotifyV3Result.DecryptNotifyResult notifyResult = wxPayService.parseOrderNotifyV3Result(jsonData, signatureHeader).getResult();
|
||||||
|
log.error("解密的: " + notifyResult);
|
||||||
// 取出数据
|
// 取出数据
|
||||||
String transactionId = notifyResult.getTransactionId();
|
String transactionId = notifyResult.getTransactionId();
|
||||||
String outTradeNo = notifyResult.getOutTradeNo();
|
String outTradeNo = notifyResult.getOutTradeNo();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue