payment

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlipayF2FConfig

type AlipayF2FConfig struct {
	AppId       string `json:"app_id"`
	PrivateKey  string `json:"private_key"`
	PublicKey   string `json:"public_key"`
	InvoiceName string `json:"invoice_name"`
	Sandbox     bool   `json:"sandbox"`
}

func (*AlipayF2FConfig) Marshal

func (l *AlipayF2FConfig) Marshal() ([]byte, error)

func (*AlipayF2FConfig) Unmarshal

func (l *AlipayF2FConfig) Unmarshal(data []byte) error

type CryptoSaaSConfig added in v1.1.0

type CryptoSaaSConfig struct {
	Endpoint  string `json:"endpoint"`
	AccountID string `json:"account_id"`
	SecretKey string `json:"secret_key"`
	Type      string `json:"type"`
}

func (*CryptoSaaSConfig) Marshal added in v1.1.0

func (l *CryptoSaaSConfig) Marshal() ([]byte, error)

func (*CryptoSaaSConfig) Unmarshal added in v1.1.0

func (l *CryptoSaaSConfig) Unmarshal(data []byte) error

type EPayConfig

type EPayConfig struct {
	Pid  string `json:"pid"`
	Url  string `json:"url"`
	Key  string `json:"key"`
	Type string `json:"type"`
}

func (*EPayConfig) Marshal

func (l *EPayConfig) Marshal() ([]byte, error)

func (*EPayConfig) Unmarshal

func (l *EPayConfig) Unmarshal(data []byte) error

type Filter

type Filter struct {
	Mark   string
	Enable *bool
	Search string
}

type Model

type Model interface {
	// contains filtered or unexported methods
}

func NewModel

func NewModel(conn *gorm.DB, c *redis.Client) Model

NewModel returns a model for the database table.

type Payment

type Payment struct {
	Id          int64  `gorm:"primaryKey"`
	Name        string `gorm:"type:varchar(100);not null;default:'';comment:Payment Name"`
	Platform    string `gorm:"<-:create;type:varchar(100);not null;comment:Payment Platform"`
	Icon        string `gorm:"type:varchar(255);default:'';comment:Payment Icon"`
	Domain      string `gorm:"type:varchar(255);default:'';comment:Notification Domain"`
	Config      string `gorm:"type:text;not null;comment:Payment Configuration"`
	Description string `gorm:"type:text;comment:Payment Description"`
	FeeMode     uint   `` /* 128-byte string literal not displayed */
	FeePercent  int64  `gorm:"type:int;default:0;comment:Fee Percentage"`
	FeeAmount   int64  `gorm:"type:int;default:0;comment:Fixed Fee Amount"`
	Enable      *bool  `gorm:"type:tinyint(1);not null;default:0;comment:Is Enabled"`
	Token       string `gorm:"type:varchar(255);unique;not null;default:'';comment:Payment Token"`
}

func (*Payment) BeforeDelete

func (l *Payment) BeforeDelete(_ *gorm.DB) (err error)

func (*Payment) TableName

func (*Payment) TableName() string

type StripeConfig

type StripeConfig struct {
	PublicKey     string `json:"public_key"`
	SecretKey     string `json:"secret_key"`
	WebhookSecret string `json:"webhook_secret"`
	Payment       string `json:"payment"`
}

func (*StripeConfig) Marshal

func (l *StripeConfig) Marshal() ([]byte, error)

func (*StripeConfig) Unmarshal

func (l *StripeConfig) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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