All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.binarywang.wxpay.bean.request.WxWithholdOrderQueryRequest Maven / Gradle / Ivy

There is a newer version: 4.6.9.B
Show newest version
package com.github.binarywang.wxpay.bean.request;

import com.github.binarywang.wxpay.exception.WxPayException;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.*;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

/**
 * @author chenliang
 * created on  2021-08-02 5:25 下午
 *
 * 
代扣订单查询参数
*/ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxWithholdOrderQueryRequest extends BaseWxPayRequest { /** *
   * 字段名:微信订单号.
   * 变量名:transaction_id
   * 是否必填:二选一
   * 类型:String(32)
   * 示例值:1000005698
   * 微信生成的单号,支付通知中返回
   * 
*/ @XStreamAlias("transaction_id") private String transactionId; /** *
   * 字段名:商户订单号.
   * 变量名:out_trade_no
   * 是否必填:二选一
   * 类型:String(32)
   * 示例值:1000005698
   * 商户系统内部订单号
   * 
*/ @XStreamAlias("out_trade_no") private String outTradeNo; @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isNotBlank(transactionId) && StringUtils.isNotBlank(outTradeNo)) { throw new WxPayException("transactionId 和 outTradeNo 不能同时存在或同时为空,必须二选一"); } } @Override protected void storeMap(Map map) { map.put("transaction_id", transactionId); map.put("out_trade_no", outTradeNo); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy