shouyin

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

README

今日收银 SDK for golang

Go Reference

今日收银 golang 版本的 sdk

使用

go get -u github.com/atishoo/jinrishouyin-gosdk

初始化

var client = shouyin.NewShouyinTodayClient("appid", "private cert")

Documentation

Index

Constants

View Source
const (
	// BaseURL is the base URL for the API
	BaseURL              string = "http://api.pay.atishoo.cn"
	CREATEORDER          string = "/api/order/create"
	REFUNDORDER          string = "/api/order/refund"
	TRANSFERORDER        string = "/api/order/transfer"
	CREATE_GRANT_QR_TEXT string = "/api/auth/qr"
	GET_USER_INFO        string = "/api/auth/profile"
	GET_USER_PHONE       string = "/api/auth/phone"
)
View Source
const SUCCESS = "SUCCESS"

Variables

View Source
var SUCCESS_RESPONSE = CashierResponse{
	Code: 1,
	Msg:  SUCCESS,
}

Functions

func NewShouyinTodayClient

func NewShouyinTodayClient(appid string, private string) *cashier

Types

type CashierResponse

type CashierResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type CreateOrder

type CreateOrder struct {
	TradeNo     string
	User        int64
	Title       string
	Description string
	Time        int64
	Money       int64
	Attach      string
	Noncestr    string
}

type CreateQrLinkData

type CreateQrLinkData struct {
	Id       string // 您的qr id,最长32位长度
	Attach   string // 附加信息
	Noncestr string // 随机字符串
}

type OrderSuccessNotifyData

type OrderSuccessNotifyData struct {
	TradeNo     string `json:"trade_no"`
	User        int64  `json:"user"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Time        int64  `json:"time"`
	Money       int64  `json:"money"`
	Appid       string `json:"appid"`
	Attach      string `json:"attach"`
	Noncestr    string `json:"noncestr"`
	Sign        string `json:"sign"`
	Status      string `json:"status"`
}

type QrGrantStatusNotifyData

type QrGrantStatusNotifyData struct {
	Code      string `json:"code"`
	Attach    string `json:"attach"`
	Status    string `json:"status"`
	UniqueId  string `json:"unique_id"`
	Noncestr  string `json:"noncestr"`
	Timestamp int64  `json:"timestamp"`
	Sign      string `json:"sign"`
}

func (*QrGrantStatusNotifyData) GetAuthCode

func (obj *QrGrantStatusNotifyData) GetAuthCode() string

func (*QrGrantStatusNotifyData) IsCancel

func (obj *QrGrantStatusNotifyData) IsCancel() bool

func (*QrGrantStatusNotifyData) IsGrant

func (obj *QrGrantStatusNotifyData) IsGrant() bool

func (*QrGrantStatusNotifyData) IsInvalid

func (obj *QrGrantStatusNotifyData) IsInvalid() bool

func (*QrGrantStatusNotifyData) IsScan

func (obj *QrGrantStatusNotifyData) IsScan() bool

type RefundOrderData

type RefundOrderData struct {
	TradeNo  string `json:"trade_no"`
	Attach   string `json:"attach"`
	Noncestr string `json:"noncestr"`
	Appid    string `json:"appid"`
	Time     int64  `json:"time"`
	Sign     string `json:"sign"`
}

type TransferPostData

type TransferPostData struct {
	User     uint64 `json:"user"`
	Appid    string `json:"appid"`
	Money    int64  `json:"money"`
	Time     int64  `json:"time"`
	Attach   string `json:"attach"`
	Noncestr string `json:"noncestr"`
	Sign     string `json:"sign"`
}

type UserInfoData

type UserInfoData struct {
	UniqueId string `json:"unique_id"`
	Nickname string `json:"nickname"`
	Avatar   string `json:"avatar"`
	Gender   int    `json:"gender"`
}

type UserPhoneData

type UserPhoneData struct {
	UserInfoData
	Phone string `json:"phone"`
}

Jump to

Keyboard shortcuts

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