| | |
| | | |
| | | import cc.mrbird.febs.pay.properties.AliPayProperties; |
| | | import cc.mrbird.febs.pay.service.AliIPayService; |
| | | import cc.mrbird.febs.pay.service.IPayService; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.internal.util.AlipaySignature; |
| | | import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse; |
| | | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.github.binarywang.wxpay.service.WxPayService; |
| | | import com.ijpay.alipay.AliPayApi; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private AliPayProperties aliPayProperties; |
| | | |
| | | @Autowired |
| | | private WxPayService wxPayService; |
| | | |
| | | @Autowired |
| | | private IPayService wechatPayService; |
| | | |
| | | @RequestMapping("/aliCallBack") |
| | | public String aliPayCallBack(HttpServletRequest request){ |
| | |
| | | return "failure"; |
| | | } |
| | | } |
| | | |
| | | @PostMapping(value = "/wxPayCallBack") |
| | | public String wxPayCallBack(@RequestBody String xmlData) throws WxPayException { |
| | | log.info("=======微信回调:{}========", xmlData); |
| | | WxPayOrderNotifyResult notifyResult = this.wxPayService.parseOrderNotifyResult(xmlData); |
| | | |
| | | wechatPayService.payCallback(notifyResult.toMap()); |
| | | return WxPayNotifyResponse.success("成功"); |
| | | } |
| | | } |