Documentation ¶
Index ¶
- type Billing
- type Card
- type Item
- type Order
- type Settings
- func (s *Settings) GetAuthHash() string
- func (s *Settings) GetAuthKey() string
- func (s *Settings) GetAuthUser() string
- func (s *Settings) GetEnvironment() string
- func (s *Settings) SetupCredentials(key, hash string)
- func (s *Settings) SetupEndpoint(endpoint string)
- func (s *Settings) SetupEnvironment(env string)
- func (s *Settings) SetupLanguage(lang string)
- func (s *Settings) SetupPlatformUser(hash string)
- func (s *Settings) SetupSandbox()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Billing ¶
type Billing struct { // Customer billing address Address string `json:"address,omitempty"` // Customer billing country alpha-2 code (ISO 3166-1) Country string `json:"country,omitempty"` // Customer billing state alpha code (ISO 3166-2) State string `json:"state,omitempty"` // Customer billing city City string `json:"city,omitempty"` // Customer billing postal code Zip string `json:"zip,omitempty"` // Customer billing phone Phone string `json:"phone,omitempty"` }
type Card ¶
type Card struct { // Card number or PAN Number string `json:"number,omitempty"` // Card security code Cvv2 string `json:"cvv2,omitempty"` // Card expire month date (MM) Expire_month int `json:"expire_month,omitempty"` // Card expire year date (YYYY) Expire_year int `json:"expire_year,omitempty"` // Cardholder name Cardholder string `json:"cardholder,omitempty"` }
type Item ¶
type Item struct { // Item identifier code or UPC/EAN Code string `json:"code,omitempty"` // Item product title Title string `json:"title,omitempty"` // Item per unit price Price float64 `json:"price,omitempty"` // Item quantity Qty int `json:"qty,omitempty"` // Item tax amount per unit Tax float64 `json:"tax,omitempty"` // Item total value Total float64 `json:"total,omitempty"` }
type Order ¶
type Order struct { // Order ID Id string `json:"id,omitempty"` // Order currency code alpha-3 Currency string `json:"currency,omitempty"` // Order total amount Amount float64 `json:"amount,omitempty"` // Order total tax amount Tax_amount float64 `json:"tax_amount,omitempty"` // Order total shipping amount Shipping_amount float64 `json:"shipping_amount,omitempty"` // Order summary of items or products Content []Item `json:"content,omitempty"` // Order extra properties Extras map[string]string `json:"extras,omitempty"` // Order note or aditional instructions Note string `json:"note,omitempty"` // Order calback webhook URL Callback_url string `json:"callback_url,omitempty"` // Order customer name Customer_name string `json:"customer_name,omitempty"` // Order customer email Customer_email string `json:"customer_email,omitempty"` }
type Settings ¶
type Settings struct { // Merchant API auth key Auth_key string `json:"auth_key,omitempty"` // Merchant API auth hash (MD5 of secret key) Auth_hash string `json:"auth_hash,omitempty"` // Merchant API platform auth user (SHA-512 of user email) Auth_user string `json:"auth_user,omitempty"` // Merchant API endpoint URL Endpoint string `json:"endpoint,omitempty"` // Merchant API environment Environment string `json:"environment,omitempty"` // Settings response messages language Lang string `json:"lang,omitempty"` // SDK identifier Sdk string `json:"sdk,omitempty"` }
func (*Settings) SetupCredentials ¶
Setup API credentials
func (*Settings) SetupEndpoint ¶
Setup API endpoint URL
func (*Settings) SetupEnvironment ¶
Setup API environment
func (*Settings) SetupLanguage ¶
Setup response messages language
func (*Settings) SetupPlatformUser ¶
Setup API platform user
func (*Settings) SetupSandbox ¶
func (s *Settings) SetupSandbox()
Setup defaults to Sandbox credentials
Click to show internal directories.
Click to hide internal directories.