update汇付充值余额,延时分账

This commit is contained in:
2023-08-17 11:29:44 +08:00
parent c818f8445e
commit 85d49e3be8

View File

@@ -607,6 +607,7 @@ public class MemberService {
log.info("使用汇付支付充值余额 支付配置参数:{}", JSON.toJSONString(config));
// 封装对象
String payMode = Constants.ADAPAY_PAY_MODE_DELAY; // 汇付延时分账
CreateAdaPaymentParam createAdaPaymentParam = new CreateAdaPaymentParam();
createAdaPaymentParam.setOrder_no(SnowflakeIdWorker.getSnowflakeId());
createAdaPaymentParam.setPay_amt(AdapayUtil.formatAmount(dto.getAmount()));
@@ -620,8 +621,11 @@ public class MemberService {
createAdaPaymentParam.setNotify_url(ADAPAY_CALLBACK_URL);
Map<String, String> map = Maps.newHashMap();
map.put("type", ScenarioEnum.BALANCE.getValue());
map.put("payMode", payMode);
map.put("memberId", dto.getMemberId());
createAdaPaymentParam.setDescription(JSON.toJSONString(map));
// 延时分账
createAdaPaymentParam.setPay_mode(payMode);
try {
log.info("创建汇付支付参数:{}", JSONObject.toJSONString(createAdaPaymentParam));
Map<String, Object> response = Payment.create(BeanMap.create(createAdaPaymentParam), config.getWechatAppId());