feat:添加米阳协议支付改为协议代扣
parent
b28d1d7445
commit
7f107ea95c
|
|
@ -61,10 +61,10 @@ public class EntPayService {
|
|||
/**
|
||||
* 300311-协议支付
|
||||
*/
|
||||
public EntPayAgrtPayResponse agrtPay(EntPayAgrtPayRequest request) {
|
||||
String url = "/entpay/agrt-pay";
|
||||
HttpResponse<EntPayAgrtPayResponse> httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(),
|
||||
request.toJsonRequest(), EntPayAgrtPayResponse.class);
|
||||
public EntPayAgrtWithholdResponse agrtWithhold(EntPayAgrtWithholdRequest request) {
|
||||
String url = "/entpay/agrt-withhold";
|
||||
HttpResponse<EntPayAgrtWithholdResponse> httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(),
|
||||
request.toJsonRequest(), EntPayAgrtWithholdResponse.class);
|
||||
return httpResponse.getServiceResponse();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,134 +0,0 @@
|
|||
package com.czcb.scfs.api.service.v2.customization.miyang.entpay.model;
|
||||
|
||||
import com.czcb.scfs.api.core.ApiRequest;
|
||||
import com.czcb.scfs.api.core.agrs.TransType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 300311-协议支付
|
||||
*
|
||||
* @author H.T
|
||||
* @since 2024-07-29
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TransType("300311")
|
||||
public class EntPayAgrtPayRequest implements ApiRequest {
|
||||
/**
|
||||
* 渠道编号
|
||||
*/
|
||||
@SerializedName("channel_no")
|
||||
private String channelNo;
|
||||
|
||||
/**
|
||||
* 应用编号
|
||||
*/
|
||||
@SerializedName("app_no")
|
||||
private String appNo;
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*/
|
||||
@SerializedName("serial_no")
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* 操作日期 yyyy-MM-dd
|
||||
*/
|
||||
@SerializedName("trans_date")
|
||||
private String transDate;
|
||||
|
||||
/**
|
||||
* 操作时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@SerializedName("trans_tradetime")
|
||||
private String transTradeTime;
|
||||
|
||||
/**
|
||||
* 付款账户账号A1
|
||||
*/
|
||||
@SerializedName("account_no_a1")
|
||||
private String accountNoA1;
|
||||
|
||||
/**
|
||||
* 付款账户户名A1
|
||||
*/
|
||||
@SerializedName("account_name_a1")
|
||||
private String accountNameA1;
|
||||
|
||||
/**
|
||||
* 支付金额1 大于等于0 不从A1支付则填0
|
||||
*/
|
||||
@SerializedName("pay_amount_a1")
|
||||
private BigDecimal payAmountA1;
|
||||
|
||||
/**
|
||||
* 付款账户账号A2
|
||||
*/
|
||||
@SerializedName("account_no_a2")
|
||||
private String accountNoA2;
|
||||
|
||||
/**
|
||||
* 付款账户户名A2
|
||||
*/
|
||||
@SerializedName("account_name_a2")
|
||||
private String accountNameA2;
|
||||
|
||||
/**
|
||||
* 支付金额2 大于等于0
|
||||
*/
|
||||
@SerializedName("pay_amount_a2")
|
||||
private BigDecimal payAmountA2;
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
@SerializedName("verify_code")
|
||||
private String verifyCode;
|
||||
|
||||
/**
|
||||
* 收款账户1账号
|
||||
*/
|
||||
@SerializedName("opp_account_no_1")
|
||||
private String oppAccountNo1;
|
||||
|
||||
/**
|
||||
*收款账户1户名
|
||||
*/
|
||||
@SerializedName("opp_account_name_1")
|
||||
private String oppAccountName1;
|
||||
|
||||
/**
|
||||
* 收款金额1 大于0
|
||||
*/
|
||||
@SerializedName("opp_amount_1")
|
||||
private BigDecimal oppAmount1;
|
||||
|
||||
/**
|
||||
* 收款账户2账号
|
||||
*/
|
||||
@SerializedName("opp_account_no_2")
|
||||
private String oppAccountNo2;
|
||||
|
||||
/**
|
||||
* 收款账户2户名
|
||||
*/
|
||||
@SerializedName("opp_account_name_2")
|
||||
private String oppAccountName2;
|
||||
|
||||
/**
|
||||
* 收款金额2 大于等于0
|
||||
*/
|
||||
@SerializedName("opp_amount_2")
|
||||
private BigDecimal oppAmount2;
|
||||
|
||||
/**
|
||||
* 摘要
|
||||
*/
|
||||
@SerializedName("remark")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.czcb.scfs.api.service.v2.customization.miyang.entpay.model;
|
||||
|
||||
import com.czcb.scfs.api.core.ApiRequest;
|
||||
import com.czcb.scfs.api.core.agrs.TransType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 300311-协议支付
|
||||
*
|
||||
* @author H.T
|
||||
* @since 2024-07-29
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TransType("300311")
|
||||
public class EntPayAgrtWithholdRequest implements ApiRequest {
|
||||
/**
|
||||
* 渠道编号
|
||||
*/
|
||||
@SerializedName("channel_no")
|
||||
private String channelNo;
|
||||
|
||||
/**
|
||||
* 应用编号
|
||||
*/
|
||||
@SerializedName("app_no")
|
||||
private String appNo;
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*/
|
||||
@SerializedName("serial_no")
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* 操作日期 yyyy-MM-dd
|
||||
*/
|
||||
@SerializedName("trans_date")
|
||||
private String transDate;
|
||||
|
||||
/**
|
||||
* 操作时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@SerializedName("trans_tradetime")
|
||||
private String transTradeTime;
|
||||
|
||||
/**
|
||||
* 付款账户账号
|
||||
*/
|
||||
@SerializedName("account_no")
|
||||
private String accountNo;
|
||||
|
||||
/**
|
||||
* 付款账户户名
|
||||
*/
|
||||
@SerializedName("account_name")
|
||||
private String accountName;
|
||||
|
||||
/**
|
||||
* 支付金额大于0
|
||||
*/
|
||||
@SerializedName("pay_amount")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 收款账户账号
|
||||
*/
|
||||
@SerializedName("opp_account_no")
|
||||
private String oppAccountNo;
|
||||
|
||||
/**
|
||||
*收款账户户名
|
||||
*/
|
||||
@SerializedName("opp_account_name")
|
||||
private String oppAccountName;
|
||||
|
||||
/**
|
||||
* 收款金额 大于0
|
||||
*/
|
||||
@SerializedName("opp_amount")
|
||||
private BigDecimal oppAmount;
|
||||
|
||||
/**
|
||||
* 摘要
|
||||
*/
|
||||
@SerializedName("remark")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ import lombok.experimental.Accessors;
|
|||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EntPayAgrtPayResponse implements ApiResponse {
|
||||
public class EntPayAgrtWithholdResponse implements ApiResponse {
|
||||
/**
|
||||
* 000000:表示成功
|
||||
*/
|
||||
|
|
@ -67,7 +67,7 @@ class EntPayServiceTest {
|
|||
@Test
|
||||
void agrtPayTest() {
|
||||
try {
|
||||
EntPayAgrtPayResponse response = service.agrtPay(new EntPayAgrtPayRequest());
|
||||
EntPayAgrtWithholdResponse response = service.agrtWithhold(new EntPayAgrtWithholdRequest());
|
||||
Assertions.assertEquals("000000", response.getRecode());
|
||||
} catch (Exception e) {
|
||||
log.info(e.getMessage());
|
||||
|
|
|
|||
Loading…
Reference in New Issue