Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateResponseCardResult ¶
func ValidateResponseCardResult(response interface{}) bool
Validates the response.
func ValidateResponseTransactionResult ¶
func ValidateResponseTransactionResult(response interface{}) bool
Validate if response type is valid for parse
Types ¶
type CardResult ¶
type CardResult struct { // Card status Status string `json:"status,omitempty"` // Card number masked Mask string `json:"mask,omitempty"` // Card network brand Network string `json:"network,omitempty"` // Card type (debit/credit) Type string `json:"type,omitempty"` // Car bin number Bin string `json:"bin,omitempty"` // Card last 4 numbers Last string `json:"last,omitempty"` // Card unique hash number Hash string `json:"hash,omitempty"` // Billing address Address string `json:"address,omitempty"` // Billing country Country string `json:"country,omitempty"` // Billing state State string `json:"state,omitempty"` // Billing city City string `json:"city,omitempty"` // The zip Zip string `json:"zip,omitempty"` // Billing customer email Email string `json:"email,omitempty"` // Billing phone Phone string `json:"phone,omitempty"` }
func FromResponseCardResult ¶
func FromResponseCardResult(response interface{}) (*CardResult, error)
Froms the response
type TransactionResult ¶
type TransactionResult struct { // Transaction response type Transaction_type string `json:"transaction_type,omitempty"` // Approved amount on capture/sale Transaction_approved_amount float64 `json:"transaction_approved_amount,omitempty"` // Initial or registered transaction amount Transaction_amount float64 `json:"transaction_amount,omitempty"` // Transaction AUTH reference code Transaction_auth string `json:"transaction_auth,omitempty"` // Transacction network terminal ID Transaction_terminal string `json:"transaction_terminal,omitempty"` // Transaction network merchant ID Transaction_merchant string `json:"transaction_merchant,omitempty"` // CVV2 result response code Response_cvn string `json:"response_cvn,omitempty"` // Address verification code response Response_avs string `json:"response_avs,omitempty"` // CAVV network evaluation result code Response_cavv string `json:"response_cavv,omitempty"` // Transaction identifier Transaction_id string `json:"transaction_id,omitempty"` // Transaction STAN, proccesor transacction identifier or transaction reference Transaction_reference string `json:"transaction_reference,omitempty"` // Transaction result time Transaction_time string `json:"transaction_time,omitempty"` // Transaction result date Transaction_date string `json:"transaction_date,omitempty"` // Response is financial approved Response_approved bool `json:"response_approved,omitempty"` // Response fatal not completed or excecution interrupted Response_incomplete bool `json:"response_incomplete,omitempty"` // Proccesor response code Response_code string `json:"response_code,omitempty"` // Network response time Response_time string `json:"response_time,omitempty"` // Proccesor response message Response_reason string `json:"response_reason,omitempty"` // Payment unique identifier Payment_uuid string `json:"payment_uuid,omitempty"` // Payment integrity validation hash Payment_hash string `json:"payment_hash,omitempty"` }
func FromResponseTransactionResult ¶
func FromResponseTransactionResult(response interface{}) (*TransactionResult, error)
Convert success response to transaction entity
Click to show internal directories.
Click to hide internal directories.