Documentation ¶
Index ¶
- func CheckHandlerRequest(r *http.Request, keys url.Values, secret string) (valid bool, method string)
- func Form(formParams Params, secret string, public string) (URL string)
- func GetErrorHandlerResponse(message string) []byte
- func GetSuccessHandlerResponse(message string) []byte
- type ApiError
- type ApiResponse
- type ApiResult
- type ErrorResponse
- type Message
- type Params
- type SuccessfulResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHandlerRequest ¶
func CheckHandlerRequest(r *http.Request, keys url.Values, secret string) (valid bool, method string)
Check response from UnitPay
func GetErrorHandlerResponse ¶
Types ¶
type ApiResponse ¶
Structs to decode API response
type ErrorResponse ¶
type ErrorResponse struct {
Error Message `json:"error"`
}
type Params ¶
type Params struct { Account string Desc string Sum string AdditionalParams map[string]string // non-vital params ex. currency or backUrl }
Params for Form
type SuccessfulResponse ¶
type SuccessfulResponse struct {
Result Message `json:"result"`
}
Click to show internal directories.
Click to hide internal directories.