mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
批量分账
This commit is contained in:
@@ -968,39 +968,6 @@ public class AdapayService {
|
||||
* @param orderCode 订单编号
|
||||
*/
|
||||
public PaymentConfirmResponse createPaymentConfirmRequest(String paymentId, AdapayMemberAccount adapayMemberAccount, BigDecimal confirmAmt, String orderCode, String wechatAppId) {
|
||||
// // 调汇付的分账接口 确认交易
|
||||
// Map<String, Object> confirmParams = Maps.newHashMap();
|
||||
// // Adapay生成的支付对象id
|
||||
// confirmParams.put("payment_id", paymentId);
|
||||
// // 请求订单号,只能为英文、数字或者下划线的一种或多种组合,保证在app_id下唯一
|
||||
// // confirmParams.put("order_no", "PC" + System.currentTimeMillis());
|
||||
// confirmParams.put("order_no", IdUtils.get16UUID("PC"));
|
||||
// // 确认金额,必须大于0,保留两位小数点,如0.10、100.05等。必须小于等于原支付金额-已确认金额-已撤销金额。
|
||||
// confirmParams.put("confirm_amt", AdapayUtil.formatAmount(confirmAmt));
|
||||
// // 附加说明
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("orderCode", orderCode);
|
||||
// jsonObject.put("adapayMemberId", adapayMemberAccount.getAdapayMemberId());
|
||||
// confirmParams.put("description", jsonObject.toJSONString());
|
||||
// // 分账对象信息 一次最多7个
|
||||
// DivMember divMember = new DivMember();
|
||||
// divMember.setMemberId(adapayMemberAccount.getAdapayMemberId());
|
||||
// divMember.setAmount(AdapayUtil.formatAmount(confirmAmt));
|
||||
// divMember.setFeeFlag(Constants.Y);
|
||||
// confirmParams.put("div_members", Lists.newArrayList(divMember));
|
||||
// Map<String, Object> paymentConfirm = null;
|
||||
// try {
|
||||
// paymentConfirm = PaymentConfirm.create(confirmParams, wechatAppId);
|
||||
// } catch (BaseAdaPayException e) {
|
||||
// log.error("创建交易确认请求error", e);
|
||||
// }
|
||||
// String jsonString = JSON.toJSONString(paymentConfirm);
|
||||
// log.info("调分账接口param:{}, result:{}", JSON.toJSONString(confirmParams), jsonString);
|
||||
//
|
||||
// // 删除支付确认信息缓存
|
||||
// redisCache.deleteObject(CacheConstants.PAYMENT_CONFIRM_LIST + paymentId);
|
||||
// return JSONObject.parseObject(jsonString, PaymentConfirmResponse.class);
|
||||
|
||||
DivMember divMember = new DivMember();
|
||||
divMember.setMemberId(adapayMemberAccount.getAdapayMemberId());
|
||||
divMember.setAmount(AdapayUtil.formatAmount(confirmAmt));
|
||||
@@ -1047,6 +1014,8 @@ public class AdapayService {
|
||||
throw new BusinessException("", "分账人数不能超过7人");
|
||||
}
|
||||
confirmParams.put("div_members", adapayMemberAccounts);
|
||||
|
||||
// 创建交易确认请求
|
||||
Map<String, Object> paymentConfirm = null;
|
||||
try {
|
||||
paymentConfirm = PaymentConfirm.create(confirmParams, wechatAppId);
|
||||
|
||||
Reference in New Issue
Block a user