mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🆕 #1305 增加商户开电子发票功能
This commit is contained in:
parent
058ce62a2b
commit
189669c20c
@ -1,13 +1,5 @@
|
||||
package me.chanjar.weixin.mp.bean.message;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
@ -19,6 +11,13 @@ import me.chanjar.weixin.mp.config.WxMpConfigStorage;
|
||||
import me.chanjar.weixin.mp.util.crypto.WxMpCryptUtil;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
import me.chanjar.weixin.mp.util.xml.XStreamTransformer;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@ -645,6 +644,44 @@ public class WxMpXmlMessage implements Serializable {
|
||||
@XStreamAlias("bizmsgmenuid")
|
||||
private String bizMsgMenuId;
|
||||
|
||||
/*------------------ 电子发票 ------------------*/
|
||||
/**
|
||||
* 授权成功的订单号,与失败订单号两者必显示其一
|
||||
*/
|
||||
@XStreamAlias("SuccOrderId")
|
||||
private String succOrderId;
|
||||
|
||||
/**
|
||||
* 授权失败的订单号,与成功订单号两者必显示其一
|
||||
*/
|
||||
@XStreamAlias("FailOrderId")
|
||||
private String failOrderId;
|
||||
|
||||
/**
|
||||
* 获取授权页链接的AppId
|
||||
*/
|
||||
@XStreamAlias("AuthorizeAppId")
|
||||
private String authorizeAppId;
|
||||
|
||||
/**
|
||||
* 授权来源,web:公众号开票,app:app开票,wxa:小程序开票,wap:h5开票
|
||||
*/
|
||||
@XStreamAlias("source")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 发票请求流水号,唯一识别发票请求的流水号
|
||||
*/
|
||||
@XStreamAlias("fpqqlsh")
|
||||
private String fpqqlsh;
|
||||
|
||||
/**
|
||||
* 纳税人识别码
|
||||
*/
|
||||
@XStreamAlias("nsrsbh")
|
||||
private String nsrsbh;
|
||||
|
||||
|
||||
public static WxMpXmlMessage fromXml(String xml) {
|
||||
//修改微信变态的消息内容格式,方便解析
|
||||
xml = xml.replace("</PicList><PicList>", "");
|
||||
|
@ -126,4 +126,19 @@ public class WxMpEventConstants {
|
||||
public static final String VERIFY_EXPIRED = "verify_expired";
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子发票.
|
||||
*/
|
||||
public static class Invoice {
|
||||
/**
|
||||
* 用户授权事件.
|
||||
*/
|
||||
public static final String USER_AUTHORIZE_INVOICE = "user_authorize_invoice";
|
||||
|
||||
/**
|
||||
* 统一开票接口-异步通知开票结果.
|
||||
*/
|
||||
public static final String CLOUD_INVOICE_INVOICERESULT_EVENT = "cloud_invoice_invoiceresult_event";
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user