model.go 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. package alipay
  2. const (
  3. // URL
  4. baseUrl = "https://openapi.alipay.com/gateway.do"
  5. sandboxBaseUrl = "https://openapi.alipaydev.com/gateway.do"
  6. baseUrlUtf8 = "https://openapi.alipay.com/gateway.do?charset=utf-8"
  7. sandboxBaseUrlUtf8 = "https://openapi.alipaydev.com/gateway.do?charset=utf-8"
  8. LocationShanghai = "Asia/Shanghai"
  9. PKCS1 PKCSType = 1
  10. PKCS8 PKCSType = 2
  11. RSA = "RSA"
  12. RSA2 = "RSA2"
  13. )
  14. type PKCSType uint8
  15. // Deprecated
  16. type NotifyRequest struct {
  17. NotifyTime string `json:"notify_time,omitempty"`
  18. NotifyType string `json:"notify_type,omitempty"`
  19. NotifyId string `json:"notify_id,omitempty"`
  20. AppId string `json:"app_id,omitempty"`
  21. Charset string `json:"charset,omitempty"`
  22. Version string `json:"version,omitempty"`
  23. SignType string `json:"sign_type,omitempty"`
  24. Sign string `json:"sign,omitempty"`
  25. AuthAppId string `json:"auth_app_id,omitempty"`
  26. TradeNo string `json:"trade_no,omitempty"`
  27. OutTradeNo string `json:"out_trade_no,omitempty"`
  28. OutBizNo string `json:"out_biz_no,omitempty"`
  29. BuyerId string `json:"buyer_id,omitempty"`
  30. BuyerLogonId string `json:"buyer_logon_id,omitempty"`
  31. SellerId string `json:"seller_id,omitempty"`
  32. SellerEmail string `json:"seller_email,omitempty"`
  33. TradeStatus string `json:"trade_status,omitempty"`
  34. TotalAmount string `json:"total_amount,omitempty"`
  35. ReceiptAmount string `json:"receipt_amount,omitempty"`
  36. InvoiceAmount string `json:"invoice_amount,omitempty"`
  37. BuyerPayAmount string `json:"buyer_pay_amount,omitempty"`
  38. PointAmount string `json:"point_amount,omitempty"`
  39. RefundFee string `json:"refund_fee,omitempty"`
  40. Subject string `json:"subject,omitempty"`
  41. Body string `json:"body,omitempty"`
  42. GmtCreate string `json:"gmt_create,omitempty"`
  43. GmtPayment string `json:"gmt_payment,omitempty"`
  44. GmtRefund string `json:"gmt_refund,omitempty"`
  45. GmtClose string `json:"gmt_close,omitempty"`
  46. FundBillList []*FundBillListInfo `json:"fund_bill_list,omitempty"`
  47. PassbackParams string `json:"passback_params,omitempty"`
  48. VoucherDetailList []*VoucherDetailListInfo `json:"voucher_detail_list,omitempty"`
  49. Method string `json:"method,omitempty"` // 电脑网站支付 支付宝请求 return_url 同步返回参数
  50. Timestamp string `json:"timestamp,omitempty"` // 电脑网站支付 支付宝请求 return_url 同步返回参数
  51. }
  52. // Deprecated
  53. type FundBillListInfo struct {
  54. Amount string `json:"amount,omitempty"`
  55. FundChannel string `json:"fundChannel,omitempty"` // 异步通知里是 fundChannel
  56. }
  57. // Deprecated
  58. type VoucherDetailListInfo struct {
  59. Id string `json:"id,omitempty"`
  60. Name string `json:"name,omitempty"`
  61. Type string `json:"type,omitempty"`
  62. Amount string `json:"amount,omitempty"`
  63. MerchantContribute string `json:"merchant_contribute,omitempty"`
  64. OtherContribute string `json:"other_contribute,omitempty"`
  65. Memo string `json:"memo,omitempty"`
  66. TemplateId string `json:"template_id,omitempty"`
  67. PurchaseBuyerContribute string `json:"purchase_buyer_contribute,omitempty"`
  68. PurchaseMerchantContribute string `json:"purchase_merchant_contribute,omitempty"`
  69. PurchaseAntContribute string `json:"purchase_ant_contribute,omitempty"`
  70. }
  71. type UserPhone struct {
  72. Code string `json:"code,omitempty"`
  73. Msg string `json:"msg,omitempty"`
  74. SubCode string `json:"subCode,omitempty"`
  75. SubMsg string `json:"subMsg,omitempty"`
  76. Mobile string `json:"mobile,omitempty"`
  77. }
  78. type ErrorResponse struct {
  79. Code string `json:"code,omitempty"`
  80. Msg string `json:"msg,omitempty"`
  81. SubCode string `json:"sub_code,omitempty"`
  82. SubMsg string `json:"sub_msg,omitempty"`
  83. }
  84. // ===================================================
  85. type TradePayResponse struct {
  86. Response *payResponse `json:"alipay_trade_pay_response,omitempty"`
  87. SignData string `json:"-"`
  88. Sign string `json:"sign"`
  89. }
  90. type payResponse struct {
  91. Code string `json:"code,omitempty"`
  92. Msg string `json:"msg,omitempty"`
  93. SubCode string `json:"sub_code,omitempty"`
  94. SubMsg string `json:"sub_msg,omitempty"`
  95. TradeNo string `json:"trade_no,omitempty"`
  96. OutTradeNo string `json:"out_trade_no,omitempty"`
  97. BuyerLogonId string `json:"buyer_logon_id,omitempty"`
  98. SettleAmount string `json:"settle_amount,omitempty"`
  99. PayCurrency string `json:"pay_currency,omitempty"`
  100. PayAmount string `json:"pay_amount,omitempty"`
  101. SettleTransRate string `json:"settle_trans_rate,omitempty"`
  102. TransPayRate string `json:"trans_pay_rate,omitempty"`
  103. TotalAmount string `json:"total_amount,omitempty"`
  104. TransCurrency string `json:"trans_currency,omitempty"`
  105. SettleCurrency string `json:"settle_currency,omitempty"`
  106. ReceiptAmount string `json:"receipt_amount,omitempty"`
  107. BuyerPayAmount string `json:"buyer_pay_amount,omitempty"`
  108. PointAmount string `json:"point_amount,omitempty"`
  109. InvoiceAmount string `json:"invoice_amount,omitempty"`
  110. GmtPayment string `json:"gmt_payment,omitempty"`
  111. FundBillList []*struct {
  112. FundChannel string `json:"fund_channel,omitempty"`
  113. BankCode string `json:"bank_code,omitempty"`
  114. Amount string `json:"amount,omitempty"`
  115. RealAmount string `json:"real_amount,omitempty"`
  116. } `json:"fund_bill_list"`
  117. CardBalance string `json:"card_balance,omitempty"`
  118. StoreName string `json:"store_name,omitempty"`
  119. BuyerUserId string `json:"buyer_user_id,omitempty"`
  120. DiscountGoodsDetail string `json:"discount_goods_detail,omitempty"`
  121. VoucherDetailList []*struct {
  122. Id string `json:"id,omitempty"`
  123. Name string `json:"name,omitempty"`
  124. Type string `json:"type,omitempty"`
  125. Amount string `json:"amount,omitempty"`
  126. MerchantContribute string `json:"merchant_contribute,omitempty"`
  127. OtherContribute string `json:"other_contribute,omitempty"`
  128. Memo string `json:"memo,omitempty"`
  129. TemplateId string `json:"template_id,omitempty"`
  130. PurchaseBuyerContribute string `json:"purchase_buyer_contribute,omitempty"`
  131. PurchaseMerchantContribute string `json:"purchase_merchant_contribute,omitempty"`
  132. PurchaseAntContribute string `json:"purchase_ant_contribute,omitempty"`
  133. } `json:"voucher_detail_list"`
  134. AdvanceAmount string `json:"advance_amount,omitempty"`
  135. AuthTradePayMode string `json:"auth_trade_pay_mode,omitempty"`
  136. ChargeAmount string `json:"charge_amount,omitempty"`
  137. ChargeFlags string `json:"charge_flags,omitempty"`
  138. SettlementId string `json:"settlement_id,omitempty"`
  139. BusinessParams string `json:"business_params,omitempty"`
  140. BuyerUserType string `json:"buyer_user_type,omitempty"`
  141. MdiscountAmount string `json:"mdiscount_amount,omitempty"`
  142. DiscountAmount string `json:"discount_amount,omitempty"`
  143. BuyerUserName string `json:"buyer_user_name,omitempty"`
  144. }
  145. // ===================================================
  146. type TradeQueryResponse struct {
  147. Response *queryResponse `json:"alipay_trade_query_response,omitempty"`
  148. SignData string `json:"-"`
  149. Sign string `json:"sign"`
  150. }
  151. type queryResponse struct {
  152. Code string `json:"code,omitempty"`
  153. Msg string `json:"msg,omitempty"`
  154. SubCode string `json:"sub_code,omitempty"`
  155. SubMsg string `json:"sub_msg,omitempty"`
  156. TradeNo string `json:"trade_no,omitempty"`
  157. OutTradeNo string `json:"out_trade_no,omitempty"`
  158. BuyerLogonId string `json:"buyer_logon_id,omitempty"`
  159. TradeStatus string `json:"trade_status,omitempty"`
  160. TotalAmount string `json:"total_amount,omitempty"`
  161. TransCurrency string `json:"trans_currency,omitempty"`
  162. SettleCurrency string `json:"settle_currency,omitempty"`
  163. SettleAmount string `json:"settle_amount,omitempty"`
  164. PayCurrency string `json:"pay_currency,omitempty"`
  165. PayAmount string `json:"pay_amount,omitempty"`
  166. SettleTransRate string `json:"settle_trans_rate,omitempty"`
  167. TransPayRate string `json:"trans_pay_rate,omitempty"`
  168. BuyerPayAmount string `json:"buyer_pay_amount,omitempty"`
  169. PointAmount string `json:"point_amount,omitempty"`
  170. InvoiceAmount string `json:"invoice_amount,omitempty"`
  171. SendPayDate string `json:"send_pay_date,omitempty"`
  172. ReceiptAmount string `json:"receipt_amount,omitempty"`
  173. StoreId string `json:"store_id,omitempty"`
  174. TerminalId string `json:"terminal_id,omitempty"`
  175. FundBillList []*struct {
  176. FundChannel string `json:"fund_channel,omitempty"`
  177. BankCode string `json:"bank_code,omitempty"`
  178. Amount string `json:"amount,omitempty"`
  179. RealAmount string `json:"real_amount,omitempty"`
  180. } `json:"fund_bill_list"`
  181. StoreName string `json:"store_name,omitempty"`
  182. BuyerUserId string `json:"buyer_user_id,omitempty"`
  183. ChargeAmount string `json:"charge_amount,omitempty"`
  184. ChargeFlags string `json:"charge_flags,omitempty"`
  185. SettlementId string `json:"settlement_id,omitempty"`
  186. TradeSettleInfo *struct {
  187. TradeSettleDetailList []*struct {
  188. OperationType string `json:"operation_type,omitempty"`
  189. OperationSerialNo string `json:"operation_serial_no,omitempty"`
  190. OperationDt string `json:"operation_dt,omitempty"`
  191. TransOut string `json:"trans_out,omitempty"`
  192. TransIn string `json:"trans_in,omitempty"`
  193. Amount string `json:"amount,omitempty"`
  194. } `json:"trade_settle_detail_list,omitempty"`
  195. } `json:"trade_settle_info,omitempty"`
  196. AuthTradePayMode string `json:"auth_trade_pay_mode,omitempty"`
  197. BuyerUserType string `json:"buyer_user_type,omitempty"`
  198. MdiscountAmount string `json:"mdiscount_amount,omitempty"`
  199. DiscountAmount string `json:"discount_amount,omitempty"`
  200. BuyerUserName string `json:"buyer_user_name,omitempty"`
  201. Subject string `json:"subject,omitempty"`
  202. Body string `json:"body,omitempty"`
  203. AlipaySubMerchantId string `json:"alipay_sub_merchant_id,omitempty"`
  204. ExtInfos string `json:"ext_infos,omitempty"`
  205. }
  206. // ===================================================
  207. type TradeCreateResponse struct {
  208. Response *createResponse `json:"alipay_trade_create_response,omitempty"`
  209. SignData string `json:"-"`
  210. Sign string `json:"sign"`
  211. }
  212. type createResponse struct {
  213. Code string `json:"code,omitempty"`
  214. Msg string `json:"msg,omitempty"`
  215. SubCode string `json:"sub_code,omitempty"`
  216. SubMsg string `json:"sub_msg,omitempty"`
  217. TradeNo string `json:"trade_no,omitempty"`
  218. OutTradeNo string `json:"out_trade_no,omitempty"`
  219. }
  220. // ===================================================
  221. type TradeCloseResponse struct {
  222. Response *closeResponse `json:"alipay_trade_close_response,omitempty"`
  223. SignData string `json:"-"`
  224. Sign string `json:"sign"`
  225. }
  226. type closeResponse struct {
  227. Code string `json:"code,omitempty"`
  228. Msg string `json:"msg,omitempty"`
  229. SubCode string `json:"sub_code,omitempty"`
  230. SubMsg string `json:"sub_msg,omitempty"`
  231. TradeNo string `json:"trade_no,omitempty"`
  232. OutTradeNo string `json:"out_trade_no,omitempty"`
  233. }
  234. // ===================================================
  235. type TradeCancelResponse struct {
  236. Response *cancelResponse `json:"alipay_trade_cancel_response,omitempty"`
  237. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  238. SignData string `json:"-"`
  239. Sign string `json:"sign"`
  240. }
  241. type cancelResponse struct {
  242. Code string `json:"code,omitempty"`
  243. Msg string `json:"msg,omitempty"`
  244. SubCode string `json:"sub_code,omitempty"`
  245. SubMsg string `json:"sub_msg,omitempty"`
  246. TradeNo string `json:"trade_no,omitempty"`
  247. OutTradeNo string `json:"out_trade_no,omitempty"`
  248. RetryFlag string `json:"retry_flag,omitempty"`
  249. Action string `json:"action,omitempty"`
  250. GmtRefundPay string `json:"gmt_refund_pay,omitempty"`
  251. RefundSettlementId string `json:"refund_settlement_id,omitempty"`
  252. }
  253. // ===================================================
  254. type SystemOauthTokenResponse struct {
  255. Response *oauthTokenInfo `json:"alipay_system_oauth_token_response,omitempty"`
  256. ErrorResponse *ErrorResponse `json:"error_response,omitempty"`
  257. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  258. SignData string `json:"-"`
  259. Sign string `json:"sign"`
  260. }
  261. type oauthTokenInfo struct {
  262. AccessToken string `json:"access_token,omitempty"`
  263. AlipayUserId string `json:"alipay_user_id,omitempty"`
  264. ExpiresIn int64 `json:"expires_in,omitempty"`
  265. ReExpiresIn int64 `json:"re_expires_in,omitempty"`
  266. RefreshToken string `json:"refresh_token,omitempty"`
  267. UserId string `json:"user_id,omitempty"`
  268. }
  269. // ===================================================
  270. type UserInfoShareResponse struct {
  271. Response *userInfoShare `json:"alipay_user_info_share_response,omitempty"`
  272. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  273. SignData string `json:"-"`
  274. Sign string `json:"sign"`
  275. }
  276. type userInfoShare struct {
  277. Code string `json:"code,omitempty"`
  278. Msg string `json:"msg,omitempty"`
  279. SubCode string `json:"sub_code,omitempty"`
  280. SubMsg string `json:"sub_msg,omitempty"`
  281. UserId string `json:"user_id,omitempty"`
  282. Avatar string `json:"avatar,omitempty"`
  283. Province string `json:"province,omitempty"`
  284. City string `json:"city,omitempty"`
  285. NickName string `json:"nick_name,omitempty"`
  286. IsStudentCertified string `json:"is_student_certified,omitempty"`
  287. UserType string `json:"user_type,omitempty"`
  288. UserStatus string `json:"user_status,omitempty"`
  289. IsCertified string `json:"is_certified,omitempty"`
  290. Gender string `json:"gender,omitempty"`
  291. }
  292. // ===================================================
  293. type TradeRefundResponse struct {
  294. Response *refundResponse `json:"alipay_trade_refund_response,omitempty"`
  295. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  296. SignData string `json:"-"`
  297. Sign string `json:"sign"`
  298. }
  299. type refundResponse struct {
  300. Code string `json:"code,omitempty"`
  301. Msg string `json:"msg,omitempty"`
  302. SubCode string `json:"sub_code,omitempty"`
  303. SubMsg string `json:"sub_msg,omitempty"`
  304. TradeNo string `json:"trade_no,omitempty"`
  305. OutTradeNo string `json:"out_trade_no,omitempty"`
  306. BuyerLogonId string `json:"buyer_logon_id,omitempty"`
  307. FundChange string `json:"fund_change,omitempty"`
  308. RefundFee string `json:"refund_fee,omitempty"`
  309. RefundCurrency string `json:"refund_currency,omitempty"`
  310. GmtRefundPay string `json:"gmt_refund_pay,omitempty"`
  311. RefundDetailItemList []*TradeFundBill `json:"refund_detail_item_list,omitempty"`
  312. StoreName string `json:"store_name,omitempty"`
  313. BuyerUserId string `json:"buyer_user_id,omitempty"`
  314. RefundPresetPaytoolList []*struct {
  315. Amount []string `json:"amount,omitempty"`
  316. AssertTypeCode string `json:"assert_type_code,omitempty"`
  317. } `json:"refund_preset_paytool_list,omitempty"`
  318. RefundSettlementId string `json:"refund_settlement_id,omitempty"`
  319. PresentRefundBuyerAmount string `json:"present_refund_buyer_amount,omitempty"`
  320. PresentRefundDiscountAmount string `json:"present_refund_discount_amount,omitempty"`
  321. PresentRefundMdiscountAmount string `json:"present_refund_mdiscount_amount,omitempty"`
  322. }
  323. type TradeFundBill struct {
  324. FundChannel string `json:"fund_channel,omitempty"` //同步通知里是 fund_channel
  325. BankCode string `json:"bank_code,omitempty"`
  326. Amount string `json:"amount,omitempty"`
  327. RealAmount string `json:"real_amount,omitempty"`
  328. FundType string `json:"fund_type,omitempty"`
  329. }
  330. // ===================================================
  331. type TradeFastpayRefundQueryResponse struct {
  332. Response *refundQueryResponse `json:"alipay_trade_fastpay_refund_query_response,omitempty"`
  333. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  334. SignData string `json:"-"`
  335. Sign string `json:"sign"`
  336. }
  337. type refundQueryResponse struct {
  338. Code string `json:"code,omitempty"`
  339. Msg string `json:"msg,omitempty"`
  340. SubCode string `json:"sub_code,omitempty"`
  341. SubMsg string `json:"sub_msg,omitempty"`
  342. TradeNo string `json:"trade_no,omitempty"`
  343. OutTradeNo string `json:"out_trade_no,omitempty"`
  344. OutRequestNo string `json:"out_request_no,omitempty"`
  345. RefundReason string `json:"refund_reason,omitempty"`
  346. TotalAmount string `json:"total_amount,omitempty"`
  347. RefundAmount string `json:"refund_amount,omitempty"`
  348. RefundRoyaltys []*struct {
  349. RefundAmount string `json:"refund_amount,omitempty"`
  350. RoyaltyType string `json:"royalty_type,omitempty"`
  351. ResultCode string `json:"result_code,omitempty"`
  352. TransOut string `json:"trans_out,omitempty"`
  353. TransOutEmail string `json:"trans_out_email,omitempty"`
  354. TransIn string `json:"trans_in,omitempty"`
  355. TransInEmail string `json:"trans_in_email,omitempty"`
  356. } `json:"refund_royaltys,omitempty"`
  357. GmtRefundPay string `json:"gmt_refund_pay,omitempty"`
  358. RefundDetailItemList []*TradeFundBill `json:"refund_detail_item_list,omitempty"`
  359. SendBackFee string `json:"send_back_fee,omitempty"`
  360. RefundSettlementId string `json:"refund_settlement_id,omitempty"`
  361. PresentRefundBuyerAmount string `json:"present_refund_buyer_amount,omitempty"`
  362. PresentRefundDiscountAmount string `json:"present_refund_discount_amount,omitempty"`
  363. PresentRefundMdiscountAmount string `json:"present_refund_mdiscount_amount,omitempty"`
  364. }
  365. // ===================================================
  366. type TradeOrderSettleResponse struct {
  367. Response *orderSettleResponse `json:"alipay_trade_order_settle_response,omitempty"`
  368. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  369. SignData string `json:"-"`
  370. Sign string `json:"sign"`
  371. }
  372. type orderSettleResponse struct {
  373. Code string `json:"code,omitempty"`
  374. Msg string `json:"msg,omitempty"`
  375. SubCode string `json:"sub_code,omitempty"`
  376. SubMsg string `json:"sub_msg,omitempty"`
  377. TradeNo string `json:"trade_no,omitempty"`
  378. }
  379. // ===================================================
  380. type TradePrecreateResponse struct {
  381. Response *precreateResponse `json:"alipay_trade_precreate_response,omitempty"`
  382. NullResponse *ErrorResponse `json:"null_response,omitempty"`
  383. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  384. SignData string `json:"-"`
  385. Sign string `json:"sign"`
  386. }
  387. type precreateResponse struct {
  388. Code string `json:"code,omitempty"`
  389. Msg string `json:"msg,omitempty"`
  390. SubCode string `json:"sub_code,omitempty"`
  391. SubMsg string `json:"sub_msg,omitempty"`
  392. OutTradeNo string `json:"out_trade_no,omitempty"`
  393. QrCode string `json:"qr_code,omitempty"`
  394. }
  395. // ===================================================
  396. type TradePageRefundResponse struct {
  397. Response *pageRefundResponse `json:"alipay_trade_page_refund_response,omitempty"`
  398. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  399. SignData string `json:"-"`
  400. Sign string `json:"sign"`
  401. }
  402. type pageRefundResponse struct {
  403. Code string `json:"code,omitempty"`
  404. Msg string `json:"msg,omitempty"`
  405. SubCode string `json:"sub_code,omitempty"`
  406. SubMsg string `json:"sub_msg,omitempty"`
  407. TradeNo string `json:"trade_no,omitempty"`
  408. OutTradeNo string `json:"out_trade_no,omitempty"`
  409. OutRequestNo string `json:"out_request_no,omitempty"`
  410. RefundAmount string `json:"refund_amount,omitempty"`
  411. }
  412. // ===================================================
  413. type FundTransToaccountTransferResponse struct {
  414. Response *transToaccountTransferResponse `json:"alipay_fund_trans_toaccount_transfer_response,omitempty"`
  415. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  416. SignData string `json:"-"`
  417. Sign string `json:"sign"`
  418. }
  419. type transToaccountTransferResponse struct {
  420. Code string `json:"code,omitempty"`
  421. Msg string `json:"msg,omitempty"`
  422. SubCode string `json:"sub_code,omitempty"`
  423. SubMsg string `json:"sub_msg,omitempty"`
  424. OutBizNo string `json:"out_biz_no,omitempty"`
  425. OrderId string `json:"order_id,omitempty"`
  426. PayDate string `json:"pay_date,omitempty"`
  427. }
  428. type FundTransUniTransferResponse struct {
  429. Response *transUniTransferResponse `json:"alipay_fund_trans_uni_transfer_response,omitempty"`
  430. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  431. SignData string `json:"-"`
  432. Sign string `json:"sign"`
  433. }
  434. type transUniTransferResponse struct {
  435. Code string `json:"code,omitempty"`
  436. Msg string `json:"msg,omitempty"`
  437. SubCode string `json:"sub_code,omitempty"`
  438. SubMsg string `json:"sub_msg,omitempty"`
  439. OutBizNo string `json:"out_biz_no,omitempty"`
  440. OrderId string `json:"order_id,omitempty"`
  441. PayFundOrderId string `json:"pay_fund_order_id,omitempty"`
  442. Status string `json:"status,omitempty"`
  443. TransDate string `json:"trans_date,omitempty"`
  444. }
  445. // ===================================================
  446. type FundTransCommonQueryResponse struct {
  447. Response *fundTransCommonQueryResponse `json:"alipay_fund_trans_common_query_response,omitempty"`
  448. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  449. SignData string `json:"-"`
  450. Sign string `json:"sign"`
  451. }
  452. type fundTransCommonQueryResponse struct {
  453. Code string `json:"code,omitempty"`
  454. Msg string `json:"msg,omitempty"`
  455. SubCode string `json:"sub_code,omitempty"`
  456. SubMsg string `json:"sub_msg,omitempty"`
  457. OrderId string `json:"order_id,omitempty"`
  458. PayFundOrderId string `json:"pay_fund_order_id,omitempty"`
  459. OutBizNo string `json:"out_biz_no,omitempty"`
  460. TransAmount string `json:"trans_amount,omitempty"`
  461. Status string `json:"status,omitempty"`
  462. PayDate string `json:"pay_date,omitempty"`
  463. ArrivalTimeEnd string `json:"arrival_time_end,omitempty"`
  464. OrderFee string `json:"order_fee,omitempty"`
  465. ErrorCode string `json:"error_code,omitempty"`
  466. FailReason string `json:"fail_reason,omitempty"`
  467. DeductBillInfo string `json:"deduct_bill_info,omitempty"`
  468. TransferBillInfo string `json:"transfer_bill_info,omitempty"`
  469. }
  470. // ===================================================
  471. type FundAccountQueryResponse struct {
  472. Response *fundAccountQueryResponse `json:"alipay_fund_account_query_response,omitempty"`
  473. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  474. SignData string `json:"-"`
  475. Sign string `json:"sign"`
  476. }
  477. type fundAccountQueryResponse struct {
  478. Code string `json:"code,omitempty"`
  479. Msg string `json:"msg,omitempty"`
  480. SubCode string `json:"sub_code,omitempty"`
  481. SubMsg string `json:"sub_msg,omitempty"`
  482. AvailableAmount string `json:"available_amount,omitempty"`
  483. ExtCardInfo *struct {
  484. CardNo string `json:"card_no,omitempty"`
  485. BankAccName string `json:"bank_acc_name,omitempty"`
  486. CardBranch string `json:"card_branch,omitempty"`
  487. CardBank string `json:"card_bank,omitempty"`
  488. CardLocation string `json:"card_location,omitempty"`
  489. CardDeposit string `json:"card_deposit,omitempty"`
  490. Status string `json:"status,omitempty"`
  491. } `json:"ext_card_info,omitempty"`
  492. }
  493. // ===================================================
  494. type ZhimaCreditScoreGetResponse struct {
  495. Response *scoreGetResponse `json:"zhima_credit_score_get_response,omitempty"`
  496. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  497. SignData string `json:"-"`
  498. Sign string `json:"sign"`
  499. }
  500. type scoreGetResponse struct {
  501. Code string `json:"code,omitempty"`
  502. Msg string `json:"msg,omitempty"`
  503. SubCode string `json:"sub_code,omitempty"`
  504. SubMsg string `json:"sub_msg,omitempty"`
  505. BizNo string `json:"biz_no,omitempty"`
  506. ZmScore string `json:"zm_score,omitempty"`
  507. }
  508. // ===================================================
  509. type OpenAuthTokenAppResponse struct {
  510. Response *authTokenAppResponse `json:"alipay_open_auth_token_app_response,omitempty"`
  511. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  512. SignData string `json:"-"`
  513. Sign string `json:"sign"`
  514. }
  515. type authTokenAppResponse struct {
  516. Code string `json:"code,omitempty"`
  517. Msg string `json:"msg,omitempty"`
  518. SubCode string `json:"sub_code,omitempty"`
  519. SubMsg string `json:"sub_msg,omitempty"`
  520. UserId string `json:"user_id,omitempty"`
  521. AuthAppId string `json:"auth_app_id,omitempty"`
  522. AppAuthToken string `json:"app_auth_token,omitempty"`
  523. AppRefreshToken string `json:"app_refresh_token,omitempty"`
  524. ExpiresIn string `json:"expires_in,omitempty"`
  525. ReExpiresIn string `json:"re_expires_in,omitempty"`
  526. Tokens []*struct {
  527. AppAuthToken string `json:"app_auth_token,omitempty"`
  528. AppRefreshToken string `json:"app_refresh_token,omitempty"`
  529. AuthAppId string `json:"auth_app_id,omitempty"`
  530. ExpiresIn string `json:"expires_in,omitempty"`
  531. ReExpiresIn string `json:"re_expires_in,omitempty"`
  532. UserId string `json:"user_id,omitempty"`
  533. } `json:"tokens,omitempty"`
  534. }
  535. // ===================================================
  536. type UserCertifyOpenInitResponse struct {
  537. Response *userCertifyOpenInitResponse `json:"alipay_user_certify_open_initialize_response,omitempty"`
  538. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  539. SignData string `json:"-"`
  540. Sign string `json:"sign"`
  541. }
  542. type userCertifyOpenInitResponse struct {
  543. Code string `json:"code,omitempty"`
  544. Msg string `json:"msg,omitempty"`
  545. SubCode string `json:"sub_code,omitempty"`
  546. SubMsg string `json:"sub_msg,omitempty"`
  547. CertifyId string `json:"certify_id,omitempty"`
  548. }
  549. // ===================================================
  550. type UserCertifyOpenCertifyResponse struct {
  551. Response *userCertifyOpenCertifyResponse `json:"alipay_user_certify_open_certify_response,omitempty"`
  552. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  553. SignData string `json:"-"`
  554. Sign string `json:"sign"`
  555. }
  556. type userCertifyOpenCertifyResponse struct {
  557. Code string `json:"code,omitempty"`
  558. Msg string `json:"msg,omitempty"`
  559. SubCode string `json:"sub_code,omitempty"`
  560. SubMsg string `json:"sub_msg,omitempty"`
  561. }
  562. // ===================================================
  563. type UserCertifyOpenQueryResponse struct {
  564. Response *userCertifyOpenQueryResponse `json:"alipay_user_certify_open_query_response,omitempty"`
  565. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  566. SignData string `json:"-"`
  567. Sign string `json:"sign"`
  568. }
  569. type userCertifyOpenQueryResponse struct {
  570. Code string `json:"code,omitempty"`
  571. Msg string `json:"msg,omitempty"`
  572. SubCode string `json:"sub_code,omitempty"`
  573. SubMsg string `json:"sub_msg,omitempty"`
  574. Passed string `json:"passed,omitempty"`
  575. IdentityInfo string `json:"identity_info,omitempty"`
  576. MaterialInfo string `json:"material_info,omitempty"`
  577. }
  578. // ===================================================
  579. type UserInfoAuthResponse struct {
  580. Response *struct {
  581. Code string `json:"code,omitempty"`
  582. Msg string `json:"msg,omitempty"`
  583. SubCode string `json:"sub_code,omitempty"`
  584. SubMsg string `json:"sub_msg,omitempty"`
  585. } `json:"alipay_user_info_auth_response,omitempty"`
  586. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  587. SignData string `json:"-"`
  588. Sign string `json:"sign"`
  589. }
  590. // ===================================================
  591. type MonitorHeartbeatSynResponse struct {
  592. Response *struct {
  593. Code string `json:"code,omitempty"`
  594. Msg string `json:"msg,omitempty"`
  595. SubCode string `json:"sub_code,omitempty"`
  596. SubMsg string `json:"sub_msg,omitempty"`
  597. Pid string `json:"pid,omitempty"`
  598. } `json:"monitor_heartbeat_syn_response,omitempty"`
  599. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  600. SignData string `json:"-"`
  601. Sign string `json:"sign"`
  602. }
  603. // ===================================================
  604. type DataBillBalanceQueryResponse struct {
  605. Response *dataBillBalanceQueryResponse `json:"alipay_data_bill_balance_query_response,omitempty"`
  606. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  607. SignData string `json:"-"`
  608. Sign string `json:"sign"`
  609. }
  610. type dataBillBalanceQueryResponse struct {
  611. Code string `json:"code,omitempty"`
  612. Msg string `json:"msg,omitempty"`
  613. SubCode string `json:"sub_code,omitempty"`
  614. SubMsg string `json:"sub_msg,omitempty"`
  615. TotalAmount string `json:"total_amount,omitempty"`
  616. AvailableAmount string `json:"available_amount,omitempty"`
  617. FreezeAmount string `json:"freeze_amount,omitempty"`
  618. }
  619. // ===================================================
  620. type DataBillDownloadUrlQueryResponse struct {
  621. Response *dataBillDownloadUrlQueryResponse `json:"alipay_data_dataservice_bill_downloadurl_query_response,omitempty"`
  622. AlipayCertSn string `json:"alipay_cert_sn,omitempty"`
  623. SignData string `json:"-"`
  624. Sign string `json:"sign"`
  625. }
  626. type dataBillDownloadUrlQueryResponse struct {
  627. Code string `json:"code,omitempty"`
  628. Msg string `json:"msg,omitempty"`
  629. SubCode string `json:"sub_code,omitempty"`
  630. SubMsg string `json:"sub_msg,omitempty"`
  631. BillDownloadUrl string `json:"bill_download_url,omitempty"`
  632. }