tlfs

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FontsMapItem

type FontsMapItem struct {
	Id    string `json:"id"`    // 表单项id
	Value string `json:"value"` // 值
}

func NewFontsMapItem

func NewFontsMapItem(id, value string) *FontsMapItem

type M

type M map[string]any

type Option

type Option struct {
	BaseURL  string `yaml:"base_url"`
	OrgID    string `yaml:"org_id"`
	AppID    string `yaml:"app_id"`
	Key      string `yaml:"key"`
	SellerID string `yaml:"seller_id"`
}

type PayRedirectURLDto

type PayRedirectURLDto struct {
	Id        string          `json:"id"`                 // 收款单id
	SellerId  string          `json:"sellerId"`           // 收款人Id
	EnterType string          `json:"enterType"`          // 类型
	Amount    string          `json:"amount"`             // 金额(分为单位)
	FontsMap  []*FontsMapItem `json:"fontsMap,omitempty"` // 表单数据
}

type PaymentContsQueryCont

type PaymentContsQueryCont struct {
	ID                string `json:"id"`
	Name              string `json:"name"`              // 信息项名称
	Type              string `json:"type"`              // 类型
	Sort              int    `json:"sort"`              // 排序
	Tip               string `json:"tip,omitempty"`     // 提示信息
	Descr             string `json:"descr,omitempty"`   // 字段描述
	Data              string `json:"data,omitempty"`    // 选项值
	Value             string `json:"value,omitempty"`   // 默认值
	Deposit           int64  `json:"deposit,omitempty"` // 商品押金,单位分
	SearchRequired    int    `json:"searchrequired,omitempty"`
	ReceivedRequired  int    `json:"receivedRequired,omitempty"`
	FoldRequired      int    `json:"foldRequired,omitempty"`
	MulPickerRequired int    `json:"mulPickerRequired,omitempty"`
	SmsCodeRequired   int    `json:"smsCodeRequired,omitempty"`
	RequireDeposit    int    `json:"requireDeposit,omitempty"`
	ScanRequired      int    `json:"scanRequired,omitempty"`
	FixAmountRequired int    `json:"fixAmountRequired,omitempty"`
	Desensitized      int    `json:"desensitized,omitempty"`
}

type PaymentContsQueryDto

type PaymentContsQueryDto struct {
	StoreId   string `json:"storeId"`   // 门店唯一标识
	PaymentId string `json:"paymentId"` // 门店收款单唯一标识
}

func NewPaymentContsQueryDto

func NewPaymentContsQueryDto(storeId string, paymentId string) *PaymentContsQueryDto

type PaymentContsQueryResult

type PaymentContsQueryResult struct {
	StoreId   string                  `json:"storeId"`   // 门店唯一标识
	PaymentId string                  `json:"paymentId"` // 收款单唯一标识
	Conts     []PaymentContsQueryCont `json:"conts"`     // 收款单信息列表
}

type PaymentQueryDto

type PaymentQueryDto struct {
	StoreId string `json:"storeId"` // 门店唯一标识
}

func NewPaymentQueryDto

func NewPaymentQueryDto(storeId string) *PaymentQueryDto

type PaymentQueryList

type PaymentQueryList struct {
	StoreId     string `json:"storeId"`     // 门店唯一标识
	PaymentId   string `json:"paymentId"`   // 收款单唯一标识
	PaymentName string `json:"paymentName"` // 收款单名称
	DataStatus  string `json:"dataStatus"`  // 收款单状态
	Type        string `json:"type"`        // 收款单类型
	CreatedDate string `json:"createdDate"` // 创建时间
}

type PaymentQueryResult

type PaymentQueryResult struct {
	List []PaymentQueryList `json:"list"`
}

type ResponseBody

type ResponseBody[T any] struct {
	Code string `json:"code"`           // 调用结果返回码
	Msg  string `json:"msg"`            // 调用结果返回码描述
	Sign string `json:"sign,omitempty"` // 商户请求参数的签名串
	Data T      `json:"data,omitempty"` // 返回参数的集合
}

type Tlfs

type Tlfs struct {
	Option *Option
	Client *resty.Client
}

func NewTlfs

func NewTlfs(opt Option) (x *Tlfs, err error)

func (*Tlfs) GetNow

func (x *Tlfs) GetNow(ctx context.Context) time.Time

func (*Tlfs) PayRedirectURL

func (x *Tlfs) PayRedirectURL(dto *PayRedirectURLDto) (_ string, err error)

func (*Tlfs) PaymentContsQuery

func (x *Tlfs) PaymentContsQuery(ctx context.Context, dto *PaymentContsQueryDto) (_ *PaymentContsQueryResult, err error)

func (*Tlfs) PaymentQuery

func (x *Tlfs) PaymentQuery(ctx context.Context, dto *PaymentQueryDto) (_ *PaymentQueryResult, err error)

func (*Tlfs) Request

func (x *Tlfs) Request(ctx context.Context, path string, content string) (_ []byte, err error)

func (*Tlfs) SetNow

func (x *Tlfs) SetNow(ctx context.Context, ts time.Time) context.Context

func (*Tlfs) Sign

func (x *Tlfs) Sign(params map[string]string) (sign string, err error)

Jump to

Keyboard shortcuts

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