mbom

package
v0.15.108 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func Notify

func Notify(orderID string, msg string) error

Types

type CommonCreateOrderRequest

type CommonCreateOrderRequest struct {
	OpenID        string `json:"openId" binding:"required"`
	TotalFee      int    `json:"totalFee" binding:"required"`
	CommodityName string `json:"commodityName" binding:"required"`
	IP            string `json:"ip" binding:"required"`
	Notify        string `json:"notify"`
}

type CreateOrderResponse

type CreateOrderResponse struct {
	Info *RechargeOrderInfo `json:"info"`
	// contains filtered or unexported fields
}

type GetOrdersQuery

type GetOrdersQuery struct {
	ID       string `form:"id"`
	OpenID   string `form:"openId"`
	TypeCode uint8  `form:"typeCode"`
	PageNo   int    `form:"pageNo"`
	PageSize int    `form:"pageSize"`
}

type GetOrdersResponse

type GetOrdersResponse struct {
	PageNo     int         `json:"pageNo"`
	TotalCount int64       `json:"totalCount"`
	Infos      []OrderInfo `json:"infos"`
	// contains filtered or unexported fields
}

type NotifyOrderRequest

type NotifyOrderRequest struct {
	OrderID string `json:"orderId"`
	Msg     string `json:"msg"`
}

type OrderInfo

type OrderInfo struct {
	ID            string `json:"id"`
	OpenID        string `json:"openId"`
	TotalFee      int    `json:"totalFee"`
	TypeCode      uint8  `json:"typeCode"`
	CommodityName string `json:"commodityName"`
	CreateTime    string `json:"createTime"`
	State         uint8  `json:"state"`
	Msg           string `json:"msg"`
	IP            string `json:"iP"`
}

func GetOrders

func GetOrders(id string, openID string, typeCode uint8, start string, end string, pageNo int, pageSize int) ([]OrderInfo, int64, error)

type RechargeOrderInfo

type RechargeOrderInfo struct {
	OrderID    string `json:"orderId"`
	CreateTime string `json:"createTime"`
	TimeStamp  string `json:"timeStamp"`
	Nonce      string `json:"nonceStr"`
	Package    string `json:"package"`
	SignType   string `json:"signType"`
	PaySign    string `json:"paySign"`
}

func RechargeBonusPoints added in v0.6.0

func RechargeBonusPoints(req *CommonCreateOrderRequest) (*RechargeOrderInfo, error)

Jump to

Keyboard shortcuts

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