ScanPayQueryResData.java 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. package com.tencent.protocol.pay_query_protocol;
  2. import com.tencent.protocol.ResData;
  3. import java.lang.reflect.Field;
  4. import java.util.HashMap;
  5. import java.util.Map;
  6. /**
  7. * User: rizenguo
  8. * Date: 2014/10/25
  9. * Time: 13:54
  10. */
  11. public class ScanPayQueryResData implements ResData {
  12. //协议层
  13. private String return_code = "";
  14. private String return_msg = "";
  15. //协议返回的具体数据(以下字段在return_code 为SUCCESS 的时候有返回)
  16. private String appid = "";
  17. private String mch_id = "";
  18. private String sub_mch_id = "";//新增
  19. private String nonce_str = "";
  20. private String sign = "";
  21. private String result_code = "";
  22. private String err_code = "";
  23. private String err_code_des = "";
  24. //以下字段在return_code 和result_code 都为SUCCESS 的时候有返回
  25. private String trade_state = "";
  26. //trade_state的几种可能取值:
  27. // SUCCESS--支付成功
  28. // REFUND--转入退款
  29. // NOTPAY--未支付
  30. // CLOSED--已关闭
  31. // REVOKED--已撤销
  32. // USERPAYING--用户支付中
  33. // NOPAY--未支付(确认支付超时)
  34. // PAYERROR--支付失败(其他原因,
  35. // 如银行返回失败)
  36. //以下字段在trade_state 为SUCCESS 或者REFUND 的时候有返回
  37. private String device_info = "";
  38. private String openid = "";
  39. private String is_subscribe = "";
  40. private String trade_type = "";
  41. private String bank_type = "";
  42. private String total_fee = "";
  43. private String coupon_fee = "";
  44. private String fee_type = "";
  45. private String transaction_id = "";
  46. private String out_trade_no = "";
  47. private String attach = "";
  48. private String time_end = "";
  49. public String getReturn_code() {
  50. return return_code;
  51. }
  52. public void setReturn_code(String return_code) {
  53. this.return_code = return_code;
  54. }
  55. public String getReturn_msg() {
  56. return return_msg;
  57. }
  58. public void setReturn_msg(String return_msg) {
  59. this.return_msg = return_msg;
  60. }
  61. public String getAppid() {
  62. return appid;
  63. }
  64. public void setAppid(String appid) {
  65. this.appid = appid;
  66. }
  67. public String getMch_id() {
  68. return mch_id;
  69. }
  70. public void setMch_id(String mch_id) {
  71. this.mch_id = mch_id;
  72. }
  73. public String getSub_mch_id() {
  74. return sub_mch_id;
  75. }
  76. public void setSub_mch_id(String sub_mch_id) {
  77. this.sub_mch_id = sub_mch_id;
  78. }
  79. public String getNonce_str() {
  80. return nonce_str;
  81. }
  82. public void setNonce_str(String nonce_str) {
  83. this.nonce_str = nonce_str;
  84. }
  85. public String getSign() {
  86. return sign;
  87. }
  88. public void setSign(String sign) {
  89. this.sign = sign;
  90. }
  91. public String getResult_code() {
  92. return result_code;
  93. }
  94. public void setResult_code(String result_code) {
  95. this.result_code = result_code;
  96. }
  97. public String getErr_code() {
  98. return err_code;
  99. }
  100. public void setErr_code(String err_code) {
  101. this.err_code = err_code;
  102. }
  103. public String getErr_code_des() {
  104. return err_code_des;
  105. }
  106. public void setErr_code_des(String err_code_des) {
  107. this.err_code_des = err_code_des;
  108. }
  109. public String getTrade_state() {
  110. return trade_state;
  111. }
  112. public void setTrade_state(String trade_state) {
  113. this.trade_state = trade_state;
  114. }
  115. public String getDevice_info() {
  116. return device_info;
  117. }
  118. public void setDevice_info(String device_info) {
  119. this.device_info = device_info;
  120. }
  121. public String getOpenid() {
  122. return openid;
  123. }
  124. public void setOpenid(String openid) {
  125. this.openid = openid;
  126. }
  127. public String getIs_subscribe() {
  128. return is_subscribe;
  129. }
  130. public void setIs_subscribe(String is_subscribe) {
  131. this.is_subscribe = is_subscribe;
  132. }
  133. public String getTrade_type() {
  134. return trade_type;
  135. }
  136. public void setTrade_type(String trade_type) {
  137. this.trade_type = trade_type;
  138. }
  139. public String getBank_type() {
  140. return bank_type;
  141. }
  142. public void setBank_type(String bank_type) {
  143. this.bank_type = bank_type;
  144. }
  145. public String getTotal_fee() {
  146. return total_fee;
  147. }
  148. public void setTotal_fee(String total_fee) {
  149. this.total_fee = total_fee;
  150. }
  151. public String getCoupon_fee() {
  152. return coupon_fee;
  153. }
  154. public void setCoupon_fee(String coupon_fee) {
  155. this.coupon_fee = coupon_fee;
  156. }
  157. public String getFee_type() {
  158. return fee_type;
  159. }
  160. public void setFee_type(String fee_type) {
  161. this.fee_type = fee_type;
  162. }
  163. public String getTransaction_id() {
  164. return transaction_id;
  165. }
  166. public void setTransaction_id(String transaction_id) {
  167. this.transaction_id = transaction_id;
  168. }
  169. public String getOut_trade_no() {
  170. return out_trade_no;
  171. }
  172. public void setOut_trade_no(String out_trade_no) {
  173. this.out_trade_no = out_trade_no;
  174. }
  175. public String getAttach() {
  176. return attach;
  177. }
  178. public void setAttach(String attach) {
  179. this.attach = attach;
  180. }
  181. public String getTime_end() {
  182. return time_end;
  183. }
  184. public void setTime_end(String time_end) {
  185. this.time_end = time_end;
  186. }
  187. public Map<String,Object> toMap(){
  188. Map<String,Object> map = new HashMap<String, Object>();
  189. Field[] fields = this.getClass().getDeclaredFields();
  190. for (Field field : fields) {
  191. Object obj;
  192. try {
  193. obj = field.get(this);
  194. if(obj!=null){
  195. map.put(field.getName(), obj);
  196. }
  197. } catch (IllegalArgumentException e) {
  198. e.printStackTrace();
  199. } catch (IllegalAccessException e) {
  200. e.printStackTrace();
  201. }
  202. }
  203. return map;
  204. }
  205. }