Documentation
¶
Index ¶
- type Checkout
- func (c *Checkout) CheckWebhookKey(keyCode, key string) bool
- func (c *Checkout) CreateInstrument(request *instruments.Request) (*instruments.Response, error)
- func (c *Checkout) CreateToken(request *tokens.Request) (string, error)
- func (c *Checkout) DeleteCustomerInstrument(instrumentID string) bool
- func (c *Checkout) GetCustomer(idOrEmail string) (bool, *CustomerResponse)
- func (c *Checkout) GetInstrument(sourceID string) (*instruments.Response, error)
- func (c *Checkout) RequestPayment(source interface{}, amount uint64, currency string, reference string, ...) *payments.Response
- func (c *Checkout) RequestRefunds(amount uint64, paymentID, reference string, metadata map[string]string) *payments.RefundsResponse
- func (c *Checkout) SaveGetClient(customerData *SaveCustomerRequest) (created bool, customer *CustomerResponse)
- type CustomerPhone
- type CustomerResponse
- type ICheckout
- type Instrument
- type SaveCustomerRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkout ¶
type Checkout struct {
// contains filtered or unexported fields
}
func NewCheckout ¶
func (*Checkout) CheckWebhookKey ¶
func (*Checkout) CreateInstrument ¶ added in v0.9.41
func (c *Checkout) CreateInstrument(request *instruments.Request) (*instruments.Response, error)
func (*Checkout) CreateToken ¶ added in v0.9.41
func (*Checkout) DeleteCustomerInstrument ¶ added in v0.9.20
func (*Checkout) GetCustomer ¶ added in v0.9.41
func (c *Checkout) GetCustomer(idOrEmail string) (bool, *CustomerResponse)
func (*Checkout) GetInstrument ¶ added in v0.9.50
func (c *Checkout) GetInstrument(sourceID string) (*instruments.Response, error)
func (*Checkout) RequestPayment ¶
func (*Checkout) RequestRefunds ¶ added in v0.9.16
func (*Checkout) SaveGetClient ¶ added in v0.9.41
func (c *Checkout) SaveGetClient(customerData *SaveCustomerRequest) (created bool, customer *CustomerResponse)
type CustomerPhone ¶ added in v0.9.41
type CustomerResponse ¶ added in v0.9.20
type CustomerResponse struct { ID string `json:"id"` Email string `json:"email"` Default string `json:"default"` Name string `json:"name"` Phone CustomerPhone `json:"phone"` Metadata struct { CouponCode string `json:"coupon_code"` PartnerID int `json:"partner_id"` } `json:"metadata"` Instruments []Instrument `json:"instruments"` }
type ICheckout ¶
type ICheckout interface { CheckWebhookKey(keyCode, key string) bool RequestPayment(source interface{}, amount uint64, currency string, reference string, customer *payments.Customer, metadata map[string]string) *payments.Response RequestRefunds(amount uint64, paymentID, reference string, metadata map[string]string) *payments.RefundsResponse DeleteCustomerInstrument(instrumentID string) bool GetCustomer(idOrEmail string) (bool, *CustomerResponse) SaveGetClient(customerData *SaveCustomerRequest) (created bool, customer *CustomerResponse) CreateToken(request *tokens.Request) (string, error) CreateInstrument(request *instruments.Request) (*instruments.Response, error) GetInstrument(sourceID string) (*instruments.Response, error) }
type Instrument ¶ added in v0.9.20
type Instrument struct { ID string `json:"id"` Type string `json:"type"` Fingerprint string `json:"fingerprint"` ExpiryMonth int `json:"expiry_month"` ExpiryYear int `json:"expiry_year"` Name string `json:"name"` Scheme string `json:"scheme"` Last4 string `json:"last4"` Bin string `json:"bin"` CardType string `json:"card_type"` CardCategory string `json:"card_category"` Issuer string `json:"issuer"` IssuerCountry string `json:"issuer_country"` ProductID string `json:"product_id"` ProductType string `json:"product_type"` AccountHolder struct { BillingAddress struct { AddressLine1 string `json:"address_line1"` AddressLine2 string `json:"address_line2"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` Country string `json:"country"` } `json:"billing_address"` Phone struct { CountryCode string `json:"country_code"` Number string `json:"number"` } `json:"phone"` } `json:"account_holder"` }
type SaveCustomerRequest ¶ added in v0.9.41
type SaveCustomerRequest struct { Email string `json:"email"` Name string `json:"name"` Phone CustomerPhone `json:"phone"` Metadata map[string]string `json:"metadata"` }
Click to show internal directories.
Click to hide internal directories.