payment

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaymentMethod

type PaymentMethod struct {
	ID          int64
	Name        string
	Platform    string
	Description string
	Icon        string
	Domain      string
	Config      string
	FeeMode     int32
	FeePercent  int64
	FeeAmount   int64
	Sort        int64
	Enable      bool
	Token       string
	SiteHost    string
}

PaymentMethod 支付方式模型 业务字段与老项目 payment 模块保持一致。

type PaymentRepo

type PaymentRepo interface {
	Create(ctx context.Context, method *PaymentMethod) (*PaymentMethod, error)
	Update(ctx context.Context, method *PaymentMethod) (*PaymentMethod, error)
	Delete(ctx context.Context, id int) error
	Get(ctx context.Context, id int) (*PaymentMethod, error)
	List(ctx context.Context, page, size int, platform, search string, enable *bool) (int32, []*PaymentMethod, error)
}

type PaymentUsecase

type PaymentUsecase struct {
	// contains filtered or unexported fields
}

func NewPaymentUsecase

func NewPaymentUsecase(repo PaymentRepo, logger log.Logger) *PaymentUsecase

func (*PaymentUsecase) CreatePaymentMethod

func (uc *PaymentUsecase) CreatePaymentMethod(ctx context.Context, name, platform, description, icon, domain, config string, feeMode int32, feePercent, feeAmount, sort int64, enable *bool) (*PaymentMethod, error)

func (*PaymentUsecase) DeletePaymentMethod

func (uc *PaymentUsecase) DeletePaymentMethod(ctx context.Context, id int) error

func (*PaymentUsecase) GetPaymentMethodList

func (uc *PaymentUsecase) GetPaymentMethodList(ctx context.Context, page, size int, platform, search string, enable *bool) (int32, []*PaymentMethod, error)

func (*PaymentUsecase) GetPaymentPlatform

func (uc *PaymentUsecase) GetPaymentPlatform(ctx context.Context) []types.PlatformInfo

func (*PaymentUsecase) UpdatePaymentMethod

func (uc *PaymentUsecase) UpdatePaymentMethod(ctx context.Context, id int, name, platform, description, icon, domain, config string, feeMode int32, feePercent, feeAmount, sort int64, enable *bool) (*PaymentMethod, error)

Jump to

Keyboard shortcuts

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