Documentation
¶
Index ¶
- func PathCat(base string, token string, action string) string
- type AdHocSubscriptionChargeReq
- type Client
- func (c *Client) AdHocCharge(token string, payload AdHocSubscriptionChargeReq) (bool, error)
- func (c *Client) Cancel(token string) (bool, error)
- func (c *Client) Fetch(token string) (*types.Subscription, error)
- func (c *Client) Pause(token string, payload PauseSubscriptionReq) (bool, error)
- func (c *Client) Unpause(token string) (bool, error)
- func (c *Client) Update(token string, payload UpdateSubscriptionReq) (*types.Subscription, error)
- type PauseSubscriptionReq
- type UpdateSubscriptionReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdHocSubscriptionChargeReq ¶
type AdHocSubscriptionChargeReq struct { Amount types.Numeric `payfast:"amount,body,numeric,required"` // The amount which the buyer must pay, in CENTS (ZAR). ItemName types.AlphaNumeric `payfast:"item_name,body,alphanumeric,required"` // The name of the item being charged for. ItemDescription types.AlphaNumeric `payfast:"item_description,body,alphanumeric,optional"` // The name of the item being charged for. ITN types.Bool `payfast:"itn,body,bool,optional"` // Specify whether an ITN must be sent for the ad hoc charge (1 by default). MPaymentID types.AlphaNumeric `payfast:"m_payment_id,body,alphanumeric,optional"` // Unique payment ID on the merchant’s system. CreditCardCVV types.Numeric `payfast:"cc_cvv,body,numeric,optional"` // The credit card cvv number. }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(get types.RemoteCall, put types.RemoteCall, patch types.RemoteCall, post types.RemoteCall) *Client
func (*Client) AdHocCharge ¶
func (c *Client) AdHocCharge(token string, payload AdHocSubscriptionChargeReq) (bool, error)
func (*Client) Pause ¶
func (c *Client) Pause(token string, payload PauseSubscriptionReq) (bool, error)
func (*Client) Update ¶
func (c *Client) Update(token string, payload UpdateSubscriptionReq) (*types.Subscription, error)
type PauseSubscriptionReq ¶
type UpdateSubscriptionReq ¶
type UpdateSubscriptionReq struct { Cycles types.Numeric `payfast:"cycles,body,numeric,optional"` // The number of cycles for the subscription. Frequency types.Numeric `payfast:"frequency,body,numeric,optional"` // The frequency for the subscription RunDate types.Time `payfast:"run_date,body,yyyy-mm-dd,optional"` // The next run date for the subscription. YYYY-MM-DD Amount types.Numeric `payfast:"amount,body,numeric,optional"` // The amount which the buyer must pay, in CENTS (ZAR). }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.