Documentation ¶
Index ¶
- Constants
- type AccountBiz
- type AccountUser
- type AggrIncomeUser
- type AggrIncomeUserAsset
- type AggrIncomeUserAssetList
- type Asset
- type AssetRelation
- type Bill
- type LogAccount
- type LogOrder
- type Order
- type OrderBadDebt
- type OrderRechargeShell
- type OrderRechargeShellLog
- type OrderRefund
- type Page
- type PayCallbackMSG
- type PayOrder
- type PayQuery
- type PayRefundCallbackEle
- type PayRefundCallbackMSG
- type RechargeShellCallbackMSG
Constants ¶
View Source
const ( StateValid = "valid" StateInvalid = "invalid" BizAsset = "asset" BizElec = "elec" AssetRelationPaid = "paid" AssetRelationNone = "none" AssetRelationMiss = "miss" OTypeArchive = "archive" OrderStateCreated = "created" OrderStatePaying = "paying" OrderStatePaid = "paid" OrderStateFailed = "failed" OrderStateClosed = "closed" OrderStateExpired = "expired" OrderStateSettled = "settled" OrderStateRefunding = "refunding" OrderStateRefunded = "refunded" OrderStateSettledRefunding = "st_refunding" OrderStateSettledRefunded = "st_refunded" OrderStateRefundFinished = "ref_finished" OrderStateDupRefunded = "dup_refunded" OrderStateBadDebt = "bad_debt" PayStatePaying = "PAYING" PayStateOverdue = "OVERDUE" PayStateClosed = "CLOSED" PayStateFail = "FAIL" PayStateSuccess = "SUCCESS" PayStateFinished = "FINISHED" PayStatePaySuccessAndCancel = "PAY_SUCCESS_AND_CANCEL" PayStatePayCancel = "PAY_CANCEL" PayStateRefund = "REFUND_SUCCESS" RechargeShellSuccess = "success" RechargeShellFail = "fail" )
各种状态枚举
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBiz ¶
type AccountBiz struct { ID int64 Biz string Currency string Balance int64 Ver int64 State string CTime time.Time MTime time.Time }
AccountBiz .
type AccountUser ¶
type AccountUser struct { ID int64 Biz string MID int64 Currency string Balance int64 Ver int64 State string CTime time.Time MTime time.Time }
AccountUser .
type AggrIncomeUser ¶
type AggrIncomeUser struct { ID int64 MID int64 Currency string PaySuccess int64 PayError int64 TotalIn int64 TotalOut int64 CTime time.Time MTime time.Time }
AggrIncomeUser .
type AggrIncomeUserAsset ¶
type AggrIncomeUserAsset struct { ID int64 MID int64 Currency string Ver int64 OID int64 OType string PaySuccess int64 PayError int64 TotalIn int64 TotalOut int64 CTime time.Time MTime time.Time }
AggrIncomeUserAsset .
type AggrIncomeUserAssetList ¶
type AggrIncomeUserAssetList struct { MID int64 Ver int64 Assets []*AggrIncomeUserAsset Page *Page }
AggrIncomeUserAssetList .
type Asset ¶
type Asset struct { ID int64 MID int64 OID int64 OType string Currency string Price int64 State string CTime time.Time MTime time.Time }
Asset .
type AssetRelation ¶
type AssetRelation struct { ID int64 OID int64 OType string MID int64 State string CTime time.Time MTime time.Time }
AssetRelation .
type Bill ¶
type Bill struct { ID int64 MID int64 Biz string Currency string In int64 Out int64 Ver int64 Version int64 CTime time.Time MTime time.Time }
Bill .
type LogAccount ¶
type LogAccount struct { ID int64 AccountID int64 From int64 To int64 Ver int64 State string CTime time.Time MTime time.Time }
LogAccount .
type LogOrder ¶
type LogOrder struct { ID int64 OrderID string FromState string ToState string Desc string CTime time.Time MTime time.Time }
LogOrder .
type Order ¶
type Order struct { ID int64 OrderID string MID int64 Biz string Platform string OID int64 OType string Fee int64 RealFee int64 Currency string PayID string PayReason string PayTime time.Time RefundTime time.Time Version int64 State string // created 已创建, paying 支付中, paid 已支付, failed 支付失败, closed 已关闭, expired 已超时, finished 已完成(支付成功且对账成功) CTime time.Time MTime time.Time }
Order .
func (*Order) ParseRefundedTime ¶
ParseRefundedTime 解析退款成功时间
func (Order) ReturnState ¶
ReturnState 返回前端显示state,重复下单的退费状态,被认为是已付费
func (*Order) UpdateState ¶
UpdateState 更新状态,return true 更新成功,false 更新失败(无需更新)
type OrderBadDebt ¶
type OrderBadDebt struct { ID int64 OrderID int64 Type string State string CTime time.Time MTime time.Time }
OrderBadDebt .
type OrderRechargeShell ¶
type OrderRechargeShell struct { ID int64 MID int64 OrderID string Biz string Amount int64 PayMSG string State string Ver int64 CTime time.Time MTime time.Time }
OrderRechargeShell .
type OrderRechargeShellLog ¶
type OrderRechargeShellLog struct { ID int64 OrderID string FromState string ToState string Desc string BillUserMonthlyID string CTime time.Time MTime time.Time }
OrderRechargeShellLog .
type OrderRefund ¶
OrderRefund .
type PayCallbackMSG ¶
type PayCallbackMSG struct { CustomerID int64 `json:"customerId"` //业务id ServiceType int64 `json:"serviceType"` //业务方业务类型 TXID int64 `json:"txId"` //支付平台支付id OrderID string `json:"orderId"` //业务方订单id DeviceType int64 `json:"deviceType"` //支付设备渠道类型, 1 pc 2 webapp 3 app 4jsapi 5 server 6小程序支付 7聚合二维码支付 PayStatus string `json:"payStatus"` //支付状态,FINISHED(交易成功)|SUCCESS(成功)|REFUND(退款中)|PAYING(支付中)|CLOSED(关闭)|NOT_PAY(未支付)|FAIL(支付失败)|WITHDRAW(支付撤销) 支付回调暂时仅通知 SUCCESS, 其他状态不通知。 PayChannelID int64 `json:"payChannelId"` //支付渠道id, 用户实际选择的支付实体渠道。(payChannel 代表笼统的微信、支付宝等第三方渠道, payChannelId 代表实际签约的实体渠道 id) PayChannel string `json:"payChannel"` //支付渠道,alipay(支付宝)、wechat(微信) ,paypal(paypal), iap(In App Purchase)、qpay(QQ支付)、huabei(花呗支付)、ali_bank(网银支付)、bocom(交行信用卡支付)、bp(B币支付) PayChannelName string `json:"payChannelName"` //支付渠道名称 如支付宝、微信、PayPal、IAP、QQ、花呗、网银支付、B币支付 PayAccount string `json:"payAccount"` //支付渠道账号 PayBank string `json:"payBank"` //支付银行 FeeType string `json:"feeType"` //货币类型,默认人民币CNY PayAmount int64 `json:"payAmount"` //实际支付金额 PayMsgContent string `json:"payMsgContent"` //支付返回的额外信息,json格式字符串,比如:payCounponAmount:使用B币券金额(单位 分),payBpAmount:B币金额(分) ExtData string `json:"extData"` //支付请求时的扩展json串 ExpiredTime int64 `json:"expiredTime"` //IAP代扣过期时间,毫秒值,业务方需要判断expiredTime的值,因为重复通知返回的expiredTime是一样的 OrderPayTime string `json:"orderPayTime"` //订单支付时间,格式:0000-00-00 00:00:00 Timestamp string `json:"timestamp"` //请求时间戳,毫秒 TraceID string `json:"traceId"` //追踪id SignType string `json:"signType"` //签名类型 ,默认MD5 Sign string `json:"sign"` //签名(应当支持支付平台这边新增返回字段) }
PayCallbackMSG .
type PayOrder ¶
type PayOrder struct { TXID int64 `json:"txId"` OrderID string `json:"orderId"` PayStatus string `json:"payStatus"` PayStatusDesc string `json:"payStatusDesc"` FailReason string `json:"failReason"` }
PayOrder .
type PayRefundCallbackEle ¶
type PayRefundCallbackEle struct { RefundStatus string `json:"refundStatus"` RefundStatusDesc string `json:"refundStatusDesc"` RefundEndTime string `json:"refundEndTime"` }
PayRefundCallbackEle .
func (*PayRefundCallbackEle) IsSuccess ¶
func (p *PayRefundCallbackEle) IsSuccess() bool
IsSuccess 是否为成功退款内容
type PayRefundCallbackMSG ¶
type PayRefundCallbackMSG struct { CustomerID int64 `json:"customerId"` //业务id OrderID string `json:"orderId"` //业务方订单id TXID int64 `json:"txId"` //支付平台支付id List []PayRefundCallbackEle `json:"batchRefundList"` // }
PayRefundCallbackMSG .
Source Files ¶
Click to show internal directories.
Click to hide internal directories.