1 package com.foxinmy.weixin4j.payment;
2
3 import java.io.Serializable;
4
5 import javax.xml.bind.annotation.XmlAccessType;
6 import javax.xml.bind.annotation.XmlAccessorType;
7 import javax.xml.bind.annotation.XmlElement;
8 import javax.xml.bind.annotation.XmlRootElement;
9 import javax.xml.bind.annotation.XmlTransient;
10
11 import com.alibaba.fastjson.annotation.JSONField;
12 import com.foxinmy.weixin4j.type.SignType;
13
14
15
16
17
18
19
20
21
22
23
24 @Deprecated
25 @XmlRootElement
26 @XmlAccessorType(XmlAccessType.FIELD)
27 public class PayBaseInfo implements Serializable {
28
29 private static final long serialVersionUID = 1843024880782466990L;
30
31
32
33
34 @JSONField(name = "appId")
35 @XmlElement(name = "AppId")
36 private String appId;
37
38
39
40 @JSONField(name = "timeStamp")
41 @XmlElement(name = "TimeStamp")
42 private String timeStamp;
43
44
45
46 @JSONField(name = "nonceStr")
47 @XmlElement(name = "NonceStr")
48 private String nonceStr;
49
50
51
52 @JSONField(name = "paySign")
53 @XmlElement(name = "AppSignature")
54 private String paySign;
55
56
57
58 @JSONField(name = "signType")
59 @XmlElement(name = "SignMethod")
60 private String signType;
61
62 public String getAppId() {
63 return appId;
64 }
65
66 public void setAppId(String appId) {
67 this.appId = appId;
68 }
69
70 public String getTimeStamp() {
71 return timeStamp;
72 }
73
74 public void setTimeStamp(String timeStamp) {
75 this.timeStamp = timeStamp;
76 }
77
78 public String getNonceStr() {
79 return nonceStr;
80 }
81
82 public void setNonceStr(String nonceStr) {
83 this.nonceStr = nonceStr;
84 }
85
86 public String getPaySign() {
87 return paySign;
88 }
89
90 public void setPaySign(String paySign) {
91 this.paySign = paySign;
92 }
93
94 public String getSignType() {
95 return signType;
96 }
97
98 @XmlTransient
99 @JSONField(serialize = false)
100 public SignType getFormatSignType() {
101 return signType != null ? SignType.valueOf(signType.toUpperCase())
102 : null;
103 }
104
105 public void setSignType(SignType signType) {
106 this.signType = signType != null ? signType.name() : null;
107 }
108
109 public PayBaseInfo() {
110 }
111
112 public PayBaseInfo(String appId, String timestamp, String noncestr) {
113 this.appId = appId;
114 this.timeStamp = timestamp;
115 this.nonceStr = noncestr;
116 }
117
118 @Override
119 public String toString() {
120 return "appId=" + appId + ", timeStamp=" + timeStamp + ", nonceStr="
121 + nonceStr + ", paySign=" + paySign + ", signType=" + signType;
122 }
123 }