InvoiceData.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /*----------------------------------------------------------------
  2. Copyright (C) 2019 Senparc
  3. 文件名:InvoiceData.cs
  4. 文件功能描述:电子票据post数据
  5. 创建标识:Senparc - 20180930
  6. ----------------------------------------------------------------*/
  7. using System.Collections.Generic;
  8. namespace Senparc.Weixin.MP.AdvancedAPIs
  9. {
  10. /// <summary>
  11. /// 获取授权页链接数据
  12. /// </summary>
  13. public class GetBillAuthUrlData
  14. {
  15. /// <summary>
  16. /// 财政局id,需要找财政局提供
  17. /// </summary>
  18. public string s_pappid { get; set; }
  19. /// <summary>
  20. /// 订单id
  21. /// </summary>
  22. public string order_id { get; set; }
  23. /// <summary>
  24. /// 订单金额,以分为单位
  25. /// </summary>
  26. public int money { get; set; }
  27. /// <summary>
  28. /// 时间戳
  29. /// </summary>
  30. public int timestamp { get; set; }
  31. /// <summary>
  32. /// 开票来源,web:公众号开票,app:app开票
  33. /// </summary>
  34. public SourceType source { get; set; }
  35. /// <summary>
  36. /// 授权成功后跳转页面
  37. /// </summary>
  38. public string redirect_url { get; set; }
  39. /// <summary>
  40. /// Api_ticket,参考获取api_ticket接口获取
  41. /// </summary>
  42. public string ticket { get; set; }
  43. }
  44. /// <summary>
  45. /// 开票授权页字段
  46. /// </summary>
  47. public class PayMchInfoData
  48. {
  49. /// <summary>
  50. /// 微信支付商户号
  51. /// </summary>
  52. public string mchid { get; set; }
  53. /// <summary>
  54. /// 开票平台id,需要找开票平台提供
  55. /// </summary>
  56. public string s_pappid { get; set; }
  57. }
  58. /// <summary>
  59. /// 用户授权数据
  60. /// </summary>
  61. public class AuthFieldData
  62. {
  63. /// <summary>
  64. /// 授权页个人发票字段
  65. /// </summary>
  66. public UserFiledData user_field { get; set; }
  67. /// <summary>
  68. /// 授权页单位发票字段
  69. /// </summary>
  70. public BizField biz_field { get; set; }
  71. }
  72. /// <summary>
  73. /// 授权页个人发票字段
  74. /// </summary>
  75. public class UserFiledData
  76. {
  77. /// <summary>
  78. /// 是否填写抬头,0为否,1为是
  79. /// </summary>
  80. public int show_title { get; set; }
  81. /// <summary>
  82. /// 是否填写电话号码,0为否,1为是
  83. /// </summary>
  84. public int show_phone { get; set; }
  85. /// <summary>
  86. /// 是否填写邮箱,0为否,1为是
  87. /// </summary>
  88. public int show_email { get; set; }
  89. /// <summary>
  90. /// 自定义字段
  91. /// </summary>
  92. public List<CustomFieldItem> custom_field { get; set; }
  93. }
  94. /// <summary>
  95. /// 授权页单位发票字段
  96. /// </summary>
  97. public class BizField
  98. {
  99. /// <summary>
  100. /// 是否填写抬头,0为否,1为是
  101. /// </summary>
  102. public int show_title { get; set; }
  103. /// <summary>
  104. /// 是否填写税号,0为否,1为是
  105. /// </summary>
  106. public int show_tax_no { get; set; }
  107. /// <summary>
  108. /// 是否填写单位地址,0为否,1为是
  109. /// </summary>
  110. public int show_addr { get; set; }
  111. /// <summary>
  112. /// 是否填写电话号码,0为否,1为是
  113. /// </summary>
  114. public int show_phone { get; set; }
  115. /// <summary>
  116. /// 是否填写开户银行,0为否,1为是
  117. /// </summary>
  118. public int show_bank_type { get; set; }
  119. /// <summary>
  120. /// 是否填写银行帐号,0为否,1为是
  121. /// </summary>
  122. public int show_bank_no { get; set; }
  123. /// <summary>
  124. /// 自定义字段
  125. /// </summary>
  126. public List<CustomFieldItem> custom_field { get; set; }
  127. }
  128. /// <summary>
  129. /// 自定义字段
  130. /// </summary>
  131. public class CustomFieldItem
  132. {
  133. /// <summary>
  134. /// 自定义字段名称,最长5个字
  135. /// </summary>
  136. public string key { get; set; }
  137. /// <summary>
  138. /// 自定义填写项用户填写的信息
  139. /// </summary>
  140. public string value { get; set; }
  141. }
  142. /// <summary>
  143. /// 获取授权页链接数据
  144. /// </summary>
  145. public class GetAuthUrlData
  146. {
  147. /// <summary>
  148. /// 开票平台在微信的标识号,商户需要找开票平台提供
  149. /// </summary>
  150. public string s_pappid { get; set; }
  151. /// <summary>
  152. /// 订单id,在商户内单笔开票请求的唯一识别号
  153. /// </summary>
  154. public string order_id { get; set; }
  155. /// <summary>
  156. /// 订单金额,以分为单位
  157. /// </summary>
  158. public int money { get; set; }
  159. /// <summary>
  160. /// 时间戳
  161. /// </summary>
  162. public int timestamp { get; set; }
  163. /// <summary>
  164. /// 开票来源,app:app开票,web:微信h5开票,wxa:小程序开发票,wap:普通网页开票
  165. /// </summary>
  166. public SourceType source { get; set; }
  167. /// <summary>
  168. /// 授权成功后跳转页面
  169. /// </summary>
  170. public string redirect_url { get; set; }
  171. /// <summary>
  172. ///
  173. /// </summary>
  174. public string ticket { get; set; }
  175. /// <summary>
  176. /// 授权类型
  177. /// </summary>
  178. public AuthType type { get; set; }
  179. }
  180. }