model.go 31 KB

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