pay

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PayResult

type PayResult struct {
	gorm.Model

	// 关联的回调记录ID
	CallbackID uint `gorm:"index;comment:回调记录ID"`

	// 支付核心信息
	OrderNo      string              `gorm:"type:varchar(64);index;not null;comment:商户订单号"`
	ThirdPartyNo string              `gorm:"type:varchar(64);index;comment:第三方交易流水号"`
	PayNo        string              `gorm:"type:varchar(64);index;comment:支付流水号"`
	Amount       decimal.Decimal     `gorm:"type:decimal(15,2);comment:支付金额"`
	PayDate      time.Time           `gorm:"type:timestamp;index;comment:支付时间"`
	Provider     _const.PayProvider  `gorm:"type:smallint;not null;default:10;comment:支付服务提供商 10:未知 11:汇付 12:首信易 13:汇聚支付"`
	BusinessType _const.BusinessType `gorm:"type:smallint;not null;default:10;comment:业务类型 10:未知 11:商城 12:会员 13:出行"`
	UsePoint     int                 `gorm:"type:int;default:0;comment:使用的积分"`

	// 售后信息
	RefundStatus _const.RefundStatus `gorm:"type:smallint;not null;default:10;comment:售后状态 10:开启 11:可售后 12:关闭"`

	// 支付结果
	Status        _const.PayStatus `gorm:"type:smallint;not null;default:10;comment:支付状态 10:未知 11:成功 12:失败 13:支付中 14:取消"`
	CallbackTimes int              `gorm:"type:int;default:0;comment:回调次数"`

	// 错误信息
	ErrCode string `gorm:"type:varchar(64);comment:错误码"`
	ErrMsg  string `gorm:"type:varchar(255);comment:错误描述"`

	// 原始响应/备注
	Remark string `gorm:"type:text;comment:备注"`

	// 回调消息队列话题
	CallbackTopic string `gorm:"type:varchar(64);comment:回调消息队列话题"`
	// 是否聚合支付
	IsAggregate bool `gorm:"type:bool;default:false;comment:是否聚合支付"`

	// 退款相关
	// 已退金额
	RefundedAmount decimal.Decimal `gorm:"type:decimal(15,2);default:0.00;comment:已退金额"`
	// 剩余金额
	RemainingAmount decimal.Decimal `gorm:"type:decimal(15,2);default:0.00;comment:剩余金额"`
}

PayResult 支付结果记录表

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL