storepay

package
v1.2.41 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StorepayAuth = utils.API{
		Url:    "/oauth/token",
		Method: http.MethodPost,
	}
	StorepayLoan = utils.API{
		Url:    "/merchant/loan",
		Method: http.MethodPost,
	}
	StorepayLoanCheck = utils.API{
		Url:    "/merchant/loan/check/",
		Method: http.MethodGet,
	}
	StorepayUserPossibleAmount = utils.API{
		Url:    "/user/possibleAmount",
		Method: http.MethodPost,
	}
)

SocialPay

Functions

This section is empty.

Types

type MsgStruct

type MsgStruct struct {
	Code   string `json:"code"`
	Text   string `json:"text"`
	Params string `json:"params"`
}

type RoleStruct

type RoleStruct struct {
	Id          int    `json:"id"`
	Code        string `json:"code"`
	Description string `json:"description"`
	Authority   string `json:"authority"`
}

type Storepay

type Storepay interface {
	LoanCheck(id string) (bool, error)
	Loan(input StorepayLoanInput) (int64, error)
	UserPossibleAmount(mobileNumber string) (float64, error)
	Close()
}

func New

func New(appUsername, appPassword, username, password, authUrl, baseUrl, storeId, callbackUrl string) Storepay

type StorepayCheckResponse

type StorepayCheckResponse struct {
	Value   bool        `json:"value"`
	MsgList []MsgStruct `json:"msgList"`
	Attrs   interface{} `json:"attrs"`
	Status  string      `json:"status"`
}

type StorepayLoanInput

type StorepayLoanInput struct {
	Description  string  `json:"description"`
	MobileNumber string  `json:"mobileNumber"`
	Amount       float64 `json:"amount"`
}

type StorepayLoanRequest

type StorepayLoanRequest struct {
	StoreId      string `json:"storeId"`
	MobileNumber string `json:"mobileNumber"`
	Description  string `json:"description"`
	Amount       string `json:"amount"`
	CallbackUrl  string `json:"callbackUrl"`
}

type StorepayLoanResponse

type StorepayLoanResponse struct {
	Value   int64       `json:"value"`
	MsgList []MsgStruct `json:"msgList"`
	Attrs   interface{} `json:"attrs"`
	Status  string      `json:"status"`
}

type StorepayUserCheckRequest

type StorepayUserCheckRequest struct {
	MobileNumber string `json:"mobileNumber"`
}

type StorepayUserCheckResponse

type StorepayUserCheckResponse struct {
	Value   float64     `json:"value"`
	MsgList []MsgStruct `json:"msgList"`
	Attrs   interface{} `json:"attrs"`
	Status  string      `json:"status"`
}

Jump to

Keyboard shortcuts

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