Documentation ¶
Index ¶
- Variables
- type Callback
- type Client
- func (c *Client) GeneratePaymentToken(invoiceID string, amount float64, redirectURL string) (*TokenResponse, error)
- func (c *Client) HttpCallback(callback func(c *Callback, r *http.Request, w http.ResponseWriter), ...) func(w http.ResponseWriter, r *http.Request)
- func (c *Client) VerifyPayment(token string, refNum string) (*VerifyResponse, error)
- type TokenResponse
- type VerifyResponse
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback struct { MID string `json:"MID"` State string `json:"State"` ResNum string `json:"ResNum"` RefNum *string `json:"RefNum"` Language string `json:"language"` Token string `json:"token"` TraceNo *string `json:"traceNo"` CustomerRefNum *string `json:"CustomerRefNum"` RedirectUrl *string `json:"redirectUrl"` CardHashPan *string `json:"CardHashPan"` CardMaskPan *string `json:"CardMaskPan"` TransactionAmount *int64 `json:"transactionAmount"` UserID *string `json:"userId"` EmailAddress *string `json:"emailAddress"` MobileNo *string `json:"mobileNo"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithHttpProxy ¶
func (*Client) GeneratePaymentToken ¶
func (*Client) HttpCallback ¶
func (c *Client) HttpCallback( callback func(c *Callback, r *http.Request, w http.ResponseWriter), onError func(err error, r *http.Request, w http.ResponseWriter), ) func(w http.ResponseWriter, r *http.Request)
func (*Client) VerifyPayment ¶
func (c *Client) VerifyPayment(token string, refNum string) (*VerifyResponse, error)
type TokenResponse ¶
type TokenResponse struct { Result string `json:"Result"` ExpirationDate int64 `json:"ExpirationDate"` Token string `json:"Token"` ChannelID string `json:"ChannelId"` UserID string `json:"UserId"` ResultCode int `json:"ResultCode"` }
func (*TokenResponse) HttpWriteSampleRedirectForm ¶
func (t *TokenResponse) HttpWriteSampleRedirectForm(rw io.Writer) error
Click to show internal directories.
Click to hide internal directories.