pay_data.go 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. package crush
  2. type (
  3. pay_req struct {
  4. MerchantOrderId string `json:"merchantOrderId,omitempty"` // 商户订单ID
  5. OrderAmount string `json:"orderAmount,omitempty"` // 订单金额,单位:元,带两位小数
  6. NotifyUrl string `json:"notifyUrl,omitempty"` // 异步回调地址
  7. }
  8. pay_resp struct {
  9. Success bool `json:"success,omitempty"`
  10. Code string `json:"code,omitempty"`
  11. Msg string `json:"msg,omitempty"`
  12. Data payRespData `json:"data,omitempty"` // 返回数据体
  13. }
  14. payRespData struct {
  15. MerchantOrderId string `json:"merchantOrderId,omitempty"` // 商户提交的订单号
  16. OrderId string `json:"orderId,omitempty"` // 系统订单号
  17. Status string `json:"status,omitempty"` // 交易状态
  18. PayUrl string `json:"payUrl,omitempty"` // 支付链接地址
  19. Message string `json:"message,omitempty"` // 跳转地址
  20. }
  21. )
  22. type (
  23. payNotify struct {
  24. OrderId string `json:"orderId,omitempty"` // 平台订单ID
  25. MerchantOrderId string `json:"merchantOrderId,omitempty"` // 商户订单ID
  26. PayAmount string `json:"payAmount,omitempty"` // 实际支付金额
  27. Status string `json:"status,omitempty"` // 支付状态:SUCCESS - 成功;FAILURE - 失败
  28. }
  29. )