View Javadoc
1   package com.foxinmy.weixin4j.payment.mch;
2   
3   import javax.xml.bind.annotation.XmlAccessType;
4   import javax.xml.bind.annotation.XmlAccessorType;
5   import javax.xml.bind.annotation.XmlElement;
6   import javax.xml.bind.annotation.XmlElements;
7   import javax.xml.bind.annotation.XmlRootElement;
8   
9   import com.foxinmy.weixin4j.type.TradeType;
10  
11  /**
12   * V3预订单信息
13   * 
14   * @className PrePay
15   * @author jinyu(foxinmy@gmail.com)
16   * @date 2014年10月21日
17   * @since JDK 1.6
18   * @see
19   * @deprecated 迁移到子模块weixin4j-pay
20   */
21  @Deprecated
22  @XmlRootElement
23  @XmlAccessorType(XmlAccessType.FIELD)
24  public class PrePay extends MerchantResult {
25  
26  	private static final long serialVersionUID = -8430005768959715444L;
27  
28  	/**
29  	 * 调用接口提交的交易类型,取值如下:JSAPI,NATIVE,APP,
30  	 * 
31  	 * @see com.foxinmy.weixin4j.mp.type.TradeType
32  	 */
33  	@XmlElement(name = "trade_type")
34  	private TradeType tradeType;
35  	/**
36  	 * 微信生成的预支付回话标识,用于后续接口调用中使用,该值有效期为2小时
37  	 */
38  	@XmlElement(name = "prepay_id")
39  	private String prepayId;
40  	/**
41  	 * 对于trade_type 为 NATIVE 或者 MWEB 是有 返回</br> NATVIE支付:可直接生成二维码展示出来进行扫码支付可能为空</br>
42  	 * MWEB支付:可直接作为跳转支付的URL
43  	 */
44  	@XmlElements({ @XmlElement(name = "code_url"),
45  			@XmlElement(name = "mweb_url") })
46  	private String payUrl;
47  
48  	protected PrePay() {
49  		// jaxb required
50  	}
51  
52  	public PrePay(String returnCode, String returnMsg) {
53  		super(returnCode, returnMsg);
54  	}
55  
56  	public TradeType getTradeType() {
57  		return tradeType;
58  	}
59  
60  	public void setTradeType(TradeType tradeType) {
61  		this.tradeType = tradeType;
62  	}
63  
64  	public String getPrepayId() {
65  		return prepayId;
66  	}
67  
68  	public void setPrepayId(String prepayId) {
69  		this.prepayId = prepayId;
70  	}
71  
72  	public String getPayUrl() {
73  		return payUrl;
74  	}
75  
76  	public void setPayUrl(String payUrl) {
77  		this.payUrl = payUrl;
78  	}
79  
80  	@Override
81  	public String toString() {
82  		return "PrePay [tradeType=" + tradeType + ", prepayId=" + prepayId
83  				+ ", payUrl=" + payUrl + ", " + super.toString() + "]";
84  	}
85  }