Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTransaction ¶
type AuthTransaction struct { // Anonymous field, to embed the PaymentTransaction struct (composition) PaymentTransaction }
AuthTransaction defines the structure for an authentication transaction request.
func NewAuthTransaction ¶
func NewAuthTransaction() *AuthTransaction
This function creates a new instance of AuthTransaction with default values for all fields.
type CaptureTransaction ¶
type CaptureTransaction struct { // Payment UUID Payment_uuid string `json:"payment_uuid,omitempty"` // The total amount to capture, equal to or less than the authorized amount. Transaction_approved_amount string `json:"transaction_approved_amount,omitempty"` // Anonymous field, to embed the RequestBehaviour struct (composition) RequestBehaviour }
CaptureTransaction defines the structure for a capture transaction request.
func NewCaptureTransaction ¶
func NewCaptureTransaction() *CaptureTransaction
This function creates a new instance of CaptureTransaction with default values for all fields.
type CardTokenization ¶
type CardTokenization 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 string `json:"expire_month,omitempty"` // Card expire year date (YYYY) Expire_year string `json:"expire_year,omitempty"` // Cardholder name Cardholder string `json:"cardholder,omitempty"` // 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"` // Customer email Email string `json:"email,omitempty"` // Anonymous field, to embed the RequestBehaviour struct (composition) RequestBehaviour }
CardTokenization defines the structure for a card tokenization request.
func NewCardTokenization ¶
func NewCardTokenization() *CardTokenization
This function creates a new instance of CardTokenization with default values for all fields.
func (*CardTokenization) SetBilling ¶
func (ct *CardTokenization) SetBilling(billing models.Billing)
This function maps the properties of the Billing model to the corresponding fields of the CardTokenization model. It associates the Billing object to the transaction object so that it can be used to perform tokenization.
The `billing` parameter contains the Billing model to be mapped.
This function updates CardTokenization the model.
func (*CardTokenization) SetCard ¶
func (ct *CardTokenization) SetCard(card models.Card)
This function maps the properties of the Card model to the corresponding fields of the CardTokenization model. It associates the Card object to the transaction object so that it can be used to perform tokenization.
The `card` parameter contains the Card model to be mapped.
This function updates CardTokenization the model.
type PaymentTransaction ¶
type PaymentTransaction struct { // Payment UUID Payment_uuid string `json:"payment_uuid,omitempty"` // Tokenized card identifier (T-* format) Card_token string `json:"card_token,omitempty"` // Card number or PAN Card_number string `json:"card_number,omitempty"` // Card security code Card_cvv string `json:"card_cvv,omitempty"` // The card expire Card_expire string `json:"card_expire,omitempty"` // Cardholder name Card_holder string `json:"card_holder,omitempty"` // Customer billing address Billing_address string `json:"billing_address,omitempty"` // Customer billing country alpha-2 code (ISO 3166-1) Billing_country string `json:"billing_country,omitempty"` // Customer billing state alpha code (ISO 3166-2) Billing_state string `json:"billing_state,omitempty"` // Customer billing city Billing_city string `json:"billing_city,omitempty"` // Customer billing postal code Billing_zip string `json:"billing_zip,omitempty"` // Customer billing phone Billing_phone string `json:"billing_phone,omitempty"` // Order customer name Customer_name string `json:"customer_name,omitempty"` // Order customer email Customer_email string `json:"customer_email,omitempty"` // Order customer device fingerprint Customer_fingerprint string `json:"customer_fingerprint,omitempty"` // Order ID Order_id string `json:"order_id,omitempty"` // Order currency code alpha-3 Order_currency string `json:"order_currency,omitempty"` // Order total amount Order_amount string `json:"order_amount,omitempty"` // Order total tax amount Order_tax_amount string `json:"order_tax_amount,omitempty"` // Order total shipping amount Order_shipping_amount string `json:"order_shipping_amount,omitempty"` // Order summary of items or products Order_content []models.Item `json:"order_content,omitempty"` // Order extra properties Order_extras map[string]string `json:"order_extras,omitempty"` // Order note or aditional instructions Order_note string `json:"order_note,omitempty"` // The order callback Order_callback string `json:"order_callback,omitempty"` // Activate authentication request (3DS/EMV) Authentication_request bool `json:"authentication_request,omitempty"` // Authentication transaction identifier Authentication_identifier string `json:"authentication_identifier,omitempty"` // Anonymous field, to embed the RequestBehaviour struct (composition) RequestBehaviour }
PaymentTransaction defines the structure for a payment transaction request.
func NewPaymentTransaction ¶
func NewPaymentTransaction() PaymentTransaction
This function creates a new instance of PaymentTransaction with default values for all fields.
func (*PaymentTransaction) SetBilling ¶
func (p *PaymentTransaction) SetBilling(billing models.Billing)
This function maps the properties of the Billing model to the corresponding fields of the PaymentTransaction model. It associates the Billing object to the transaction object so that it can be used to perform Payment.
The `billing` parameter contains the Billing model to be mapped.
This function updates PaymentTransaction the model.
func (*PaymentTransaction) SetCard ¶
func (p *PaymentTransaction) SetCard(card models.Card)
This function maps the properties of the Card model to the corresponding fields of the PaymentTransaction model. It associates the Card object to the transaction object so that it can be used to perform Payment.
The `card` parameter contains the Card model to be mapped.
This function updates PaymentTransaction the model.
func (*PaymentTransaction) SetCardToken ¶
func (p *PaymentTransaction) SetCardToken(token string)
This function associates the token of the card to the corresponding fields of the PaymentTransaction model. It associates a Card to the transaction object so that it can be used to perform Payment.
The `token` parameter is a unique key associated to a Card.
This function updates PaymentTransaction the model.
func (*PaymentTransaction) SetOrder ¶
func (p *PaymentTransaction) SetOrder(order models.Order)
This function maps the properties of the Order model to the corresponding fields of the PaymentTransaction model. It associates the Order object to the transaction object so that it can be used to perform Payment.
The `order` parameter contains the Order model to be mapped.
This function updates PaymentTransaction the model.
func (*PaymentTransaction) WithAuthenticationRequest ¶
func (p *PaymentTransaction) WithAuthenticationRequest()
This function enables 3DS/EMV authentication for the PaymentTransaction model so that will be required to perform Payment.
This function updates PaymentTransaction the model.
type RequestBehaviour ¶
type RequestBehaviour struct { // Environment identifier (live|test|sandbox) Env string `json:"env,omitempty"` // Transaction response messages language Lang string `json:"lang,omitempty"` // SDK identifier type From string `json:"from,omitempty"` // SDK version Sdk_version string `json:"sdk_version,omitempty"` }
RequestBehaviour defines the structure for the request behaviour.
func NewRequestBehaviour ¶
func NewRequestBehaviour() RequestBehaviour
This function creates a new instance of RequestBehaviour with default values for all fields.
type SaleTransaction ¶
type SaleTransaction struct { // Anonymous field, to embed the PaymentTransaction struct (composition) PaymentTransaction }
SaleTransaction defines the structure for a sale transaction request.
func NewSaleTransaction ¶
func NewSaleTransaction() *SaleTransaction
This function creates a new instance of SaleTransaction with default values for all fields.
type StatusTransaction ¶
type StatusTransaction struct { // Payment UUID Payment_uuid string `json:"payment_uuid,omitempty"` // Anonymous field, to embed the RequestBehaviour struct (composition) RequestBehaviour }
StatusTransaction defines the structure for a status transaction request.
func NewStatusTransaction ¶
func NewStatusTransaction() *StatusTransaction
This function creates a new instance of StatusTransaction with default values for all fields.
type VoidTransaction ¶
type VoidTransaction struct { // Payment UUID Payment_uuid string `json:"payment_uuid,omitempty"` // Reason for void the order Void_reason string `json:"void_reason,omitempty"` // Anonymous field, to embed the RequestBehaviour struct (composition) RequestBehaviour }
VoidTransaction defines the structure for a void transaction request.
func NewVoidTransaction ¶
func NewVoidTransaction() *VoidTransaction
This function creates a new instance of VoidTransaction with default values for all fields.