拉卡拉支付调试修正

This commit is contained in:
Jack 2025-02-03 17:57:33 +08:00
parent 7f7430291a
commit 48c5ca7905
3 changed files with 14 additions and 8 deletions

View File

@ -49,7 +49,7 @@ public class LakalaServiceImpl implements LakalaService {
@Value("${lakala.lkl_platform_cer_path}")
private String lklNotifyCerPath; //拉卡拉支付平台证书地址2(用于拉卡拉通知验签)
// 可选的两个参数
//### 可选的两个参数不同的店铺商家可以数据库里配置不同的商户号和终端号
@Value("${lakala.merchant_no}")
public String merchantNo; // 拉卡拉分配的商户号
@Value("${lakala.term_no}")
@ -148,6 +148,7 @@ public class LakalaServiceImpl implements LakalaService {
// 41:NATIVEALIPAY云闪付支持京东白条分期51:JSAPI微信公众号支付支付宝服务窗支付银联JS支付翼支付JS支付拉卡拉钱包支付71:微信小程序支付 61:APP支付微信APP支付
v3LabsTransPreorderWechatReq.setTransType("51");
v3LabsTransPreorderWechatReq.setTotalAmount(totalAmount);
v3LabsTransPreorderWechatReq.setSettleType("1"); //0或者空常规结算方式如需接拉卡拉分账通需传1商户未开通分账之前切记不用上送此参数
v3LabsTransPreorderWechatReq.setNotifyUrl(notifyURL);
v3LabsTransPreorderWechatReq.setRemark(remark);

View File

@ -193,10 +193,15 @@ public class PayConsumeDepositServiceImpl extends BaseServiceImpl<PayConsumeDepo
public boolean processDeposit(PayConsumeDeposit notify_row, BigDecimal money,
BigDecimal recharge_card, BigDecimal points,
BigDecimal credit, BigDecimal redpack) {
if (ObjectUtil.isEmpty(notify_row)) {
throw new ApiException(ResultCode.FAILED);
}
String order_id = notify_row.getOrder_id();
String deposit_trade_no = notify_row.getDeposit_trade_no();
notify_row.setDeposit_subject(StrUtil.trim(notify_row.getDeposit_subject()));
QueryWrapper<PayConsumeDeposit> deposit_column_row = new QueryWrapper<>();
deposit_column_row.eq("order_id", order_id);

View File

@ -1297,8 +1297,8 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
String orderSubject = "";
Integer userId = 0;
// 交易模式 2直接交易:商家直接收款 1担保交易平台收款平台和商家结算
// if (!accountBaseConfigService.getTradeModePlantform()) {
// 不可以联合支付
// if (!accountBaseConfigService.getTradeModePlantform()) {
//不可以联合支付
QueryWrapper<PayConsumeTrade> tradeQueryWrapper = new QueryWrapper<>();
tradeQueryWrapper.eq("order_id", order_id);
PayConsumeTrade trade_row_tmp = payConsumeTradeService.findOne(tradeQueryWrapper);
@ -1308,7 +1308,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
orderSubject = trade_row_tmp.getTrade_title();
userId = trade_row_tmp.getBuyer_id();
}
// }
//}
QueryWrapper<PayPaymentChannel> channelQueryWrapper = new QueryWrapper<>();
channelQueryWrapper.eq("payment_channel_code", "lakala");
@ -1316,7 +1316,6 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
Integer payment_channel_id = payPaymentChannel.getPayment_channel_id();
// 插入充值记录
PayConsumeDeposit notify_row = createNotify(params, payPaymentChannel);
notify_row.setOrder_id(order_id);
notify_row.setStore_id(payment_store_id); // 所属店铺
@ -1325,8 +1324,9 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
notify_row.setDeposit_subject(orderSubject);
notify_row.setDeposit_body(orderSubject);
notify_row.setUser_id(userId);
notify_row.setDeposit_async(1); // 是否同步:0-同步; 1-异步回调使用
notify_row.setDeposit_state(1);// 支付状态:0-默认; 1-接收正确数据处理完逻辑; 9-异常订单
// notify_row.setDeposit_state(1);// 支付状态:0-默认; 1-接收正确数据处理完逻辑; 9-异常订单
// notify_row.setDeposit_async(0); // 是否同步:0-同步; 1-异步回调使用
BigDecimal zero = BigDecimal.ZERO;
@ -1350,7 +1350,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
throw new ApiException(e.getMessage());
}
return lklNotifyMsg(true, "");
return lklNotifyMsg(true, "执行成功");
} catch (Exception e) {
logger.error("通知处理发生异常:" + e.getMessage() + " {}", e);