mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
创建余额支付请求
This commit is contained in:
@@ -453,6 +453,12 @@ public class AdapayMemberService {
|
||||
log.info("取现接口返回参数" + JSON.toJSONString(settleCount));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新汇付会员信息
|
||||
* @param dto
|
||||
* @return
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
public Map<String, Object> updateAdapayMember(SettleAccountDTO dto) throws BaseAdaPayException {
|
||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(dto.getMerchantId());
|
||||
if (adapayMemberAccount == null) {
|
||||
@@ -487,4 +493,24 @@ public class AdapayMemberService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建余额支付请求
|
||||
* @param outMemberId 出账用户的member_id, 若为商户本身时,请传入0
|
||||
* @param inMemberId 入账用户的member_id, 若为商户本身时,请传入0
|
||||
* @param transAmt 交易金额, 必须大于0,保留两位小数点,如0.10、100.05等
|
||||
*/
|
||||
public void createBalancePaymentRequest(String outMemberId, String inMemberId, String transAmt) throws BaseAdaPayException {
|
||||
Map<String, Object> balanceParam = Maps.newHashMap();
|
||||
balanceParam.put("app_id", ADAPAY_APP_ID);
|
||||
balanceParam.put("adapay_func_code", "settle_accounts.balancePay");
|
||||
balanceParam.put("order_no", IdUtils.fastSimpleUUID());
|
||||
balanceParam.put("out_member_id", outMemberId);
|
||||
balanceParam.put("in_member_id", "0");
|
||||
balanceParam.put("trans_amt", AdapayUtil.formatAmount(transAmt));
|
||||
balanceParam.put("goods_title", "测试余额支付");
|
||||
balanceParam.put("goods_desc", "该商品信息用于测试余额支付");
|
||||
Map<String, Object> paymentResult = AdapayCommon.requestAdapay(balanceParam);
|
||||
log.info("创建余额支付param:{}, result:{}", JSON.toJSONString(balanceParam), JSON.toJSONString(paymentResult));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user