|
|
@@ -1154,6 +1154,42 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String v3TransferNotifyApp(String notifyData, HttpServletRequest request) {
|
|
|
+ logger.info("zyp \n【app-收到转账回调V3】:{}",notifyData);
|
|
|
+ try {
|
|
|
+ String json = configService.selectConfigByKey("his.AppRedPacket");
|
|
|
+ RedPacketConfig config = JSONUtil.toBean(json, RedPacketConfig.class);
|
|
|
+ //创建微信订单
|
|
|
+ WxPayConfig payConfig = new WxPayConfig();
|
|
|
+ BeanUtils.copyProperties(config,payConfig);
|
|
|
+ WxPayService wxPayService = new WxPayServiceImpl();
|
|
|
+ wxPayService.setConfig(payConfig);
|
|
|
+ SignatureHeader signatureHeader = new SignatureHeader();
|
|
|
+ signatureHeader.setTimeStamp(request.getHeader("Wechatpay-Timestamp"));
|
|
|
+ signatureHeader.setNonce(request.getHeader("Wechatpay-Nonce"));
|
|
|
+ signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
|
|
|
+ signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
|
|
|
+ TransferBillsNotifyResult result = wxPayService.parseTransferBillsNotifyV3Result(notifyData,signatureHeader);
|
|
|
+ logger.info("app-到零钱回调:{}",result.getResult());
|
|
|
+ if (result.getResult().getState().equals("SUCCESS")) {
|
|
|
+ R r = redPacketLogService.syncRedPacket(result.getResult().getOutBillNo(),result.getResult().getTransferBillNo());
|
|
|
+ logger.info("app,result:{}",r);
|
|
|
+ if (r.get("code").equals(200)){
|
|
|
+ return WxPayNotifyResponse.success("处理成功");
|
|
|
+ }else {
|
|
|
+ return WxPayNotifyResponse.fail("");
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return WxPayNotifyResponse.fail("");
|
|
|
+ }
|
|
|
+ } catch (WxPayException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ logger.error("zyp \n【app-转账回调异常】:{}", e.getReturnMsg());
|
|
|
+ return WxPayNotifyResponse.fail(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public String v3TransferNotifyWithCompanyId(Long companyId, String notifyData, HttpServletRequest request) {
|
|
|
logger.info("分公司回调V3::companyId:{}",companyId);
|