gop24

package
v0.0.4-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	RegisterTransaction(request RegistrationParams) (RegistrationResponse, error)
	VerifyTransaction(params Notification) error
}

func NewClient

func NewClient(merchantID uint, posID uint, crcKey string, reportKey string, sandbox bool) Client

type Notification

type Notification struct {
	MerchantID   uint   `json:"merchantId"`
	PosID        uint   `json:"posId"`
	SessionID    string `json:"sessionId"`
	Amount       uint   `json:"amount"`
	OriginAmount uint   `json:"originAmount"`
	Currency     string `json:"currency"`
	OrderID      uint   `json:"orderId"`
	MethodID     uint   `json:"methodId"`
	Statement    string `json:"statement"`
	Sign         string `json:"sign"`
}

func UnmarshalNotification

func UnmarshalNotification(body []byte) (Notification, error)

type RegistrationParams

type RegistrationParams struct {
	SessionID     string
	Amount        uint
	Currency      string
	Description   string
	Email         string
	FullName      string
	Country       string
	Language      string
	Phone         string
	AppointmentID uint
	UrlReturn     string
	UrlStatus     string
}

type RegistrationResponse

type RegistrationResponse struct {
	Token       string
	RedirectUrl string
}

Jump to

Keyboard shortcuts

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