settle

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StateInit 分账状态:INIT:初始化,PROCESSING:处理中,SUCCESS:处理成功,FAIL:处理失败
	StateInit = "INIT"
	// StateProcessing 分账状态:INIT:初始化,PROCESSING:处理中,SUCCESS:处理成功,FAIL:处理失败
	StateProcessing = "PROCESSING"
	// StateSuccess 分账状态:INIT:初始化,PROCESSING:处理中,SUCCESS:处理成功,FAIL:处理失败
	StateSuccess = "SUCCESS"
	// StateFail 分账状态:INIT:初始化,PROCESSING:处理中,SUCCESS:处理成功,FAIL:处理失败
	StateFail = "FAIL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplySettleData

type ApplySettleData struct {
	WalletSettleID string `json:"wallet_settle_id" desc:"小程序底层分账单号"`
	SettleID       string `json:"settle_id" desc:"小程序侧分账单号"`
}

type ApplySettleRequest

type ApplySettleRequest struct {
	OutOrderNo   string `json:"out_order_no"`
	OutSettleNo  string `json:"out_settle_no"`
	ItemOrderID  string `json:"item_order_id,omitempty"`
	SettleDesc   string `json:"settle_desc"`
	SettleParams string `` /* 151-byte string literal not displayed */
	Ext          string `` /* 148-byte string literal not displayed */
	NotifyURL    string `json:"notify_url"`
}

ApplySettleRequest 申请分账

type ApplySettleResponse

type ApplySettleResponse struct {
	ErrMsg string           `json:"err_msg"`
	ErrNo  int              `json:"err_no"`
	LogID  string           `json:"log_id"`
	Data   *ApplySettleData `json:"data"`
}

ApplySettleResponse 申请分账

type OtherSettleParam

type OtherSettleParam struct {
	MerchantUid string `json:"merchant_uid"`
	Amount      int    `json:"amount"`
}

OtherSettleParam 其他结算参数

type QuerySettleData

type QuerySettleData struct {
	SettleAmount   int    `json:"settle_amount"`
	CpExtra        string `json:"cp_extra"`
	OutSettleID    string `json:"out_settle_id"`
	OrderID        string `json:"order_id"`
	OutOrderID     string `json:"out_order_id"`
	PlatformTicket int    `json:"platform_ticket"`
	Rake           int    `json:"rake"`
	SettleAt       int64  `json:"settle_at"`
	SettleDetail   string `json:"settle_detail"`
	Commission     int    `json:"commission"`
	ItemOrderID    string `json:"item_order_id"`
	SettleID       string `json:"settle_id"`
	SettleStatus   string `json:"settle_status"`
}

QuerySettleData 查询分账

type QuerySettleRequest

type QuerySettleRequest struct {
	OutOrderNo  string `json:"out_order_no,omitempty"`
	OutSettleNo string `json:"out_settle_no,omitempty"`
	OrderID     string `json:"order_id,omitempty"`
	SettleID    string `json:"settle_id,omitempty"`
	AppID       string `json:"app_id"`
}

QuerySettleRequest 查询分账 以上 4 个参数选填一个,查询优先级:settle_id > order_id > out_settle_no > out_order_no。 例如:请求填写了 settle_id 和 order_id,服务只会按 settle_id 来查询,忽略 order_id。 如果未查询到结果,会返回空数组。

type QuerySettleResponse

type QuerySettleResponse struct {
	Data   []*QuerySettleData `json:"data"`
	ErrMsg string             `json:"err_msg"`
	ErrNo  int                `json:"err_no"`
	LogID  string             `json:"log_id"`
}

QuerySettleResponse 查询分账

type Settle

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

Settle merchant account settle

func NewSettle

func NewSettle(cfg *credential.ContextConfig) *Settle

NewSettle init

func (*Settle) Apply

func (t *Settle) Apply(ctx context.Context, req *ApplySettleRequest) (resp *ApplySettleResponse, err error)

Apply 申请结算

func (*Settle) Query

func (t *Settle) Query(ctx context.Context, req *QuerySettleRequest) (resp *QuerySettleResponse, err error)

Query 查询结算

Jump to

Keyboard shortcuts

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