service

package
v0.0.0-...-86f4363 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaymentService

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

func (*PaymentService) CheckOrderExist

func (svc *PaymentService) CheckOrderExist(ctx context.Context, orderID int64) (orderInfo bool, err error)

TODO 后面完善这个接口,要发起RPC请求向order模块申请数据库的查询,所以后面再来写

func (*PaymentService) CheckRedisRateLimiting

func (svc *PaymentService) CheckRedisRateLimiting(ctx context.Context, uid int64, orderID int64) (frequencyInfo bool, timeInfo bool, err error)

func (*PaymentService) CreatePaymentInfo

func (svc *PaymentService) CreatePaymentInfo(ctx context.Context, orderID int64) (paymentID int64, err error)

CreatePaymentInfo sf可以生成id,详见user/domain/service/service.go

func (*PaymentService) CreateRefundInfo

func (svc *PaymentService) CreateRefundInfo(ctx context.Context, orderID int64) (refundID int64, err error)

func (*PaymentService) GeneratePaymentToken

func (svc *PaymentService) GeneratePaymentToken(ctx context.Context, orderID int64) (string, int64, error)

GeneratePaymentToken HMAC生成支付令牌

func (*PaymentService) GetUserID

func (svc *PaymentService) GetUserID(ctx context.Context) (uid int64, err error)

GetUserID 等User模块完成了再写这个,从ctx里获取userID

func (*PaymentService) StorePaymentToken

func (svc *PaymentService) StorePaymentToken(ctx context.Context, token string, expTime int64, userID int64, orderID int64) (bool, error)

StorePaymentToken 这里的返回值还没有想好,是返回状态码还是消息字段?

Jump to

Keyboard shortcuts

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