微信企业支付--用户提现到微信钱包余额Java实现

参考文档:【微信支付】付款开发者文档

1. 实体类(入参,结果类)

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 提现到微信钱包入参dto
 * @author ljchen
 */
@Data
@ApiModel(value = "WithdrawalParamDto", description = "提现入参dto")
public class WithdrawalParamDto {
    @ApiModelProperty(value = "收款用户姓名: re_user_name", required = true)
    String reUserName;
    @ApiModelProperty(value = "付款金额,单位为分: amount", required = true)
    String amount;
    @ApiModelProperty(value = "付款备注: desc")
    @Length(max = 100)
    String desc;
}

 

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author ljchen
 */
@ApiModel(value = "TransferResultDto")
@Data
public class TransferResultDto {
    @ApiModelProperty(value = "转账结果:成功或失败(SUCCESS/FAIL)")
    String resultCode;
    @ApiModelProperty(value = "商户转账订单号")
    String partnerTradeNo;
    @ApiModelProperty(value = "微信订单号")
    String paymentNo;
    @ApiModelProperty(value = "微信支付成功时间")
    String paymentTime;

    @ApiModelProperty(value = "错误代码")
    String errorCode;
    @ApiModelProperty(value = "错误代码描述")
    String errorCodeDes;
}

2. Service 实现:

    private String DESC_STR = "提现到微信钱包";
    private String DEFAULT_IP_ADDR = "127.0.0.1";
    private String DEFAULT_CHECK_NAME = "FORCE_CHECK";

    @Resource
    WxPayV3Bean wxPayV3Bean;

    /**
     * 微信提现
     * @return
     * @throws Exception
     */
    public TransferResultDto wxWithdrawalTransferSample(Wit
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值