Documentation
¶
Index ¶
- Constants
- type AcquirerDetails
- type Address
- type Algorithm
- type CallbackResult
- type CardFamily
- type CommandData
- type CommandDataExploreGWTransactionIDs
- type CommandDataExploreMerchantTransactionIDs
- type CommandDataFormID
- type CommandDataGWTransactionID
- type CommandDataTerminalMID
- type CsvReport
- type CustomerData
- type Enrollment
- type EnrollmentResponse
- type Error
- type ErrorCode
- type ExploringHistoryResponse
- type ExploringLimitsResponse
- type ExploringRecurrentsResponse
- type ExploringRefundsResponse
- type ExploringResultResponse
- type ExploringStatusResponse
- type ExternalMpiData
- type ExternalTokenData
- type Gateway
- type GatewayResponse
- type GeneralData
- type HistoryEvent
- type Limit
- type MoneyData
- type OperationRequestHTTPData
- type OperationRequestInterface
- type OperationType
- type OrderData
- type PaymentMethodData
- type PaymentMethodType
- type QOP
- type RequestDigest
- type RequestHTTPData
- type ResponseDigest
- type Status
- type SystemData
- type Time
- type TransactionHistory
- type TransactionInfo
- type TransactionRecurrings
- type TransactionRefunds
- type TransactionResponse
- type TransactionResult
- type TransactionStatus
- type TransactionStatusList
- type URL
- type Verify3dEnrollmentData
- type VerifyCardData
Constants ¶
const ( CardVerificationModeInit = 1 CardVerificationModeVerify = 2 )
Card verification allowed modes
const ( DataSourceCardholder = iota DataSourceSaveToGateway DataSourceUseGatewaySavedCardholderInitiated DataSourceSavingByMerchant DataSourceUseMerchantSavedCardholderInitiated DataSourceUseGatewaySavedMerchantInitiated DataSourceUseMerchantSavedMerchantInitiated )
Payment data source allowed values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquirerDetails ¶
type AcquirerDetails struct {
DynamicDescriptor string `json:"dynamic-descriptor,omitempty"`
EciSli string `json:"eci-sli,omitempty"`
TerminalID string `json:"terminal-mid,omitempty"`
TransactionID string `json:"transaction-id,omitempty"`
ResultCode string `json:"result-code,omitempty"`
StatusText string `json:"status-text,omitempty"`
StatusDescription string `json:"status-description,omitempty"`
}
AcquirerDetails response translated via Transact Pro system
type Address ¶
type Address struct {
// Billing\Shipping country
Country string `json:"country,omitempty"`
// Billing\Shipping state
State string `json:"state,omitempty"`
// Billing\Shipping city
City string `json:"city,omitempty"`
// Billing\Shipping street
Street string `json:"street,omitempty"`
// Billing\Shipping house number
House string `json:"house,omitempty"`
// Billing\Shipping flat number
Flat string `json:"flat,omitempty"`
// Billing\Shipping zip number
ZIP string `json:"zip,omitempty"`
}
Address structure with detailed fields of customer(cardholder) place
type Algorithm ¶
type Algorithm uint
Algorithm is a custom type for Authorization header "algorithm" field
Authorization header's "algorithm" values
func NewAlgorithm ¶
NewAlgorithm creates Algorithm value from raw string or returns an error if input is unknown
type CallbackResult ¶
type CallbackResult struct {
Error Error `json:"error,omitempty"`
ResultData TransactionResponse `json:"result-data,omitempty"`
}
CallbackResult is a structure for callback payload JSON
type CardFamily ¶ added in v1.7.5
type CardFamily int
CardFamily represents card family
const ( CardFamilyUnknown CardFamily = iota CardFamilyVISA CardFamilyMasterCard CardFamilyMaestro CardFamilyAmericanExpress )
Card families
func (CardFamily) String ¶ added in v1.7.5
func (o CardFamily) String() string
func (*CardFamily) UnmarshalJSON ¶ added in v1.7.5
func (o *CardFamily) UnmarshalJSON(raw []byte) error
UnmarshalJSON is a custom unmarshal function for 3-D Secure enrollment representation string
type CommandData ¶
type CommandData struct {
CardVerificationMode uint `json:"card-verification,omitempty"`
PaymentMethodDataSource uint `json:"payment-method-data-source"`
PaymentMethodDataToken string `json:"payment-method-data-token,omitempty"`
PaymentMethodType PaymentMethodType `json:"payment-method-type,omitempty"`
}
CommandData structure with fields to set various payment processing modes
type CommandDataExploreGWTransactionIDs ¶
type CommandDataExploreGWTransactionIDs struct {
// Previously created Transaction in Transact Pro system
GWTransactionIDs []string `json:"gateway-transaction-ids,omitempty"`
}
CommandDataExploreGWTransactionIDs used in explore operations and contains the slice of GWTransactionID's
type CommandDataExploreMerchantTransactionIDs ¶
type CommandDataExploreMerchantTransactionIDs struct {
// Previously created Transaction in Transact Pro system
MerchantTransactionIDs []string `json:"merchant-transaction-ids,omitempty"`
}
CommandDataExploreMerchantTransactionIDs used in explore operations and contains the slice of MerchantTransactionIDs's
type CommandDataFormID ¶
type CommandDataFormID struct {
// Inside form ID when selecting non-default form manually, allowed in sms, dms-hold
FormID string `json:"form-id,omitempty"`
}
CommandDataFormID is single structures fields for CommandData, it's used not for any operation
type CommandDataGWTransactionID ¶
type CommandDataGWTransactionID struct {
// Previously created Transaction in Transact Pro system
GWTransactionID string `json:"gateway-transaction-id,omitempty"`
}
CommandDataGWTransactionID is single structures fields for CommandData, it's used not for any operation
type CommandDataTerminalMID ¶
type CommandDataTerminalMID struct {
// TerminalMID when selecting terminal manually, allowed in sms, dms-hold
TerminalMID string `json:"terminal-mid,omitempty"`
}
CommandDataTerminalMID is single structures fields for CommandData, it's used not for any operation
type CsvReport ¶
type CsvReport struct {
Headers []string
// contains filtered or unexported fields
}
CsvReport represents parsed CSV report
func NewCsvReport ¶
func NewCsvReport(response *GatewayResponse) (result *CsvReport, err error)
NewCsvReport create instance of CsvReport from response payload. Payload MUST contain headers line, otherwise an error will be returned.
type CustomerData ¶
type CustomerData struct {
// Customer (cardholder) email
Email string `json:"email,omitempty"`
// Customer (cardholder) phone
Phone string `json:"phone,omitempty"`
// Customer (cardholder) birth date in "MMDDYYYY" format
BirthDate string `json:"birth-date,omitempty"`
// Customer (cardholder) physical location
BillingAddress Address `json:"billing-address,omitempty"`
// Customer (cardholder) address where he want to receive orders
ShippingAddress Address `json:"shipping-address,omitempty"`
}
CustomerData structure with detailed fields of customer(cardholder)
type Enrollment ¶
type Enrollment int
Enrollment represents card's 3-D Secure enrollment
const ( EnrollmentUnknown Enrollment = iota EnrollmentNo EnrollmentYes )
3-D Secure enrollment statuses
func (Enrollment) String ¶
func (o Enrollment) String() string
func (*Enrollment) UnmarshalJSON ¶
func (o *Enrollment) UnmarshalJSON(raw []byte) error
UnmarshalJSON is a custom unmarshal function for 3-D Secure enrollment representation string
type EnrollmentResponse ¶
type EnrollmentResponse struct {
Error *Error `json:"error,omitempty"`
Enrollment Enrollment `json:"enrollment,omitempty"`
}
EnrollmentResponse represents card's 3-D Secure verification response
type Error ¶
type Error struct {
Code ErrorCode `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}
Error is a generic error structure that might be returned with any response collections responses (like refunds exploration) may contain errors as response collection items
type ErrorCode ¶
type ErrorCode int
ErrorCode represents Gateway error
const ( EecGeneralError ErrorCode = 1000 EecDisabledAccount ErrorCode = 1001 EecDisabledTerminal ErrorCode = 1002 EecDisabledLegalPerson ErrorCode = 1003 EecTimeoutTransaction ErrorCode = 1004 EecTimeoutRedirect ErrorCode = 1005 EecTimeout3D ErrorCode = 1006 EecTimeoutAcquirer ErrorCode = 1007 EecTimeoutInternal ErrorCode = 1008 EecHsmEncode ErrorCode = 1009 EecHsmDecode ErrorCode = 1010 EecMerchantCountersExceeded ErrorCode = 1011 EecAccountCountersExceeded ErrorCode = 1012 EecTerminalGroupCountersExceeded ErrorCode = 1013 EecTerminalCountersExceeded ErrorCode = 1014 EecHsmToken ErrorCode = 1015 EecHsmDataExpired ErrorCode = 1016 EecInputValidationFailed ErrorCode = 1100 EecFailedBusinessRules ErrorCode = 1101 EecCardBadNumber ErrorCode = 1102 EecCardBadExpire ErrorCode = 1103 EecCardNoCVV ErrorCode = 1104 EecCardBadCVV ErrorCode = 1105 EecCardExpired ErrorCode = 1106 EecCardUnknownCardType ErrorCode = 1107 Eec3DErrorMdStatus ErrorCode = 1108 Eec3DErrorAuth ErrorCode = 1109 EecCardLiabilityShift ErrorCode = 1110 EecCardNotValidated ErrorCode = 1111 Eec3DDataCorrupted ErrorCode = 1112 EecWrongGwUniqID ErrorCode = 1151 EecUnacceptableGwUniqID ErrorCode = 1152 EecGwUniqIDConflict ErrorCode = 1153 EecTransactionTypeInvalid ErrorCode = 1154 EecTransactionStateInvalid ErrorCode = 1155 EecTransactionAlreadyFinished ErrorCode = 1156 EecNoParentTransactionProvided ErrorCode = 1157 EecDynamicDescriptorError ErrorCode = 1158 EecUcofError ErrorCode = 1159 EecSuspectedFraud ErrorCode = 1160 EecTerminalNotFound ErrorCode = 1200 EecAllTerminalCountersExceeded ErrorCode = 1201 EecTerminalGroupNotFound ErrorCode = 1202 EecAllTerminalGroupCountersExceeded ErrorCode = 1203 EecTerminalNotSupportingMOTO ErrorCode = 1204 EecTerminalNotSupportingRecurringTransactions ErrorCode = 1205 EecDeclinedByAcquirer ErrorCode = 1301 EecAcquirerError ErrorCode = 1302 EecAcquirerSoftDecline ErrorCode = 1303 EecInvalidFormID ErrorCode = 1400 EecCardVerificationNoCardData ErrorCode = 1500 EecCardVerificationAlreadyVerified ErrorCode = 1501 EecRbsInvalidOrderNumber ErrorCode = 2000 EecRbsInvalidDescription ErrorCode = 2001 )
Gateway transaction errors
type ExploringHistoryResponse ¶
type ExploringHistoryResponse struct {
Error *Error `json:"error,omitempty"`
Transactions []TransactionHistory `json:"transactions,omitempty"`
}
ExploringHistoryResponse represents transactions' history response
type ExploringLimitsResponse ¶
type ExploringLimitsResponse struct {
Error *Error `json:"error,omitempty"`
Type string `json:"type,omitempty"`
Title string `json:"title,omitempty"`
AcqTerminalID *string `json:"acq-terminal-id,omitempty"`
Limits []Limit `json:"counters,omitempty"`
Children []ExploringLimitsResponse `json:"childs,omitempty"`
}
ExploringLimitsResponse represents limits response
type ExploringRecurrentsResponse ¶
type ExploringRecurrentsResponse struct {
Error *Error `json:"error,omitempty"`
Transactions []TransactionRecurrings `json:"transactions,omitempty"`
}
ExploringRecurrentsResponse represents subsequent recurring transactions response
type ExploringRefundsResponse ¶
type ExploringRefundsResponse struct {
Error *Error `json:"error,omitempty"`
Transactions []TransactionRefunds `json:"transactions,omitempty"`
}
ExploringRefundsResponse represents refunds response
type ExploringResultResponse ¶
type ExploringResultResponse struct {
Error *Error `json:"error,omitempty"`
Transactions []TransactionResult `json:"transactions,omitempty"`
}
ExploringResultResponse represents transaction's result response
type ExploringStatusResponse ¶
type ExploringStatusResponse struct {
Error *Error `json:"error,omitempty"`
Transactions []TransactionStatusList `json:"transactions,omitempty"`
}
ExploringStatusResponse represents transaction's status response
type ExternalMpiData ¶ added in v1.7.6
type ExternalMpiData struct {
// protocolVersion received from 3-D Secure
ProtocolVersion string `json:"protocolVersion,omitempty"`
// dsTransID received from 3-D Secure
DsTransID string `json:"dsTransID,omitempty"`
// xid used for 3-D Secure
XID string `json:"xid,omitempty"`
// cavv received from 3-D Secure
CAVV string `json:"cavv,omitempty"`
// transStatus received from 3-D Secure
TransStatus string `json:"transStatus,omitempty"`
}
ExternalMpiData is a structure for 3-D Secure data required for an acquirer
type ExternalTokenData ¶ added in v1.7.9
type ExternalTokenData struct {
// TAVV etc.
Cryptogram string `json:"cryptogram,omitempty"`
// Electronic commerce indicator
Eci string `json:"eci,omitempty"`
// 3-D Secure transStatus
TransStatus string `json:"transStatus,omitempty"`
// 3-D Secure dsTransID
DsTransID string `json:"dsTransID,omitempty"`
// 3-D Secure acsTransID
AcsTransID string `json:"acsTransID,omitempty"`
// for Google Pay: value of assuranceDetails.cardHolderAuthenticated
CardHolderAuthenticated bool `json:"cardHolderAuthenticated"`
}
ExternalTokenData is a structure for decrypted token data
type Gateway ¶
type Gateway struct {
GatewayTransactionID string `json:"gateway-transaction-id,omitempty"`
MerchantTransactionID string `json:"merchant-transaction-id,omitempty"`
StatusCode Status `json:"status-code,omitempty"`
StatusText string `json:"status-text,omitempty"`
RedirectURL *URL `json:"redirect-url,omitempty"`
OriginalGatewayTransactionID *string `json:"original-gateway-transaction-id,omitempty"`
ParentGatewayTransactionID *string `json:"parent-gateway-transaction-id,omitempty"`
}
Gateway Transact Pro system response
type GatewayResponse ¶
type GatewayResponse struct {
*http.Response
Payload []byte
Digest *ResponseDigest
}
GatewayResponse represents generic Gateway response wrapper
func NewGatewayResponse ¶
func NewGatewayResponse(httpResponse *http.Response, payload []byte) *GatewayResponse
NewGatewayResponse creates Gateway response wrapper over standard http.Response
func (*GatewayResponse) ParseJSON ¶
func (o *GatewayResponse) ParseJSON(output interface{}) error
ParseJSON parses response payload as JSON into given object reference
func (*GatewayResponse) Successful ¶
func (o *GatewayResponse) Successful() bool
Successful returns TRUE for non-declined responses
type GeneralData ¶
type GeneralData struct {
CustomerData CustomerData `json:"customer-data,omitempty"`
OrderData OrderData `json:"order-data,omitempty"`
}
GeneralData combined structure about customer data and order data
type HistoryEvent ¶
type HistoryEvent struct {
DateUpdated Time `json:"date-updated,omitempty"`
StatusCodeNew Status `json:"status-code-new,omitempty"`
StatusCodeOld Status `json:"status-code-old,omitempty"`
StatusTextNew string `json:"status-text-new,omitempty"`
StatusTextOld string `json:"status-text-old,omitempty"`
}
HistoryEvent represents one history event for a history transaction item
type Limit ¶
type Limit struct {
CounterType string `json:"counter-type,omitempty"`
Currency string `json:"currency,omitempty"`
Limit json.Number `json:"limit,omitempty"`
PaymentMethodSubtype string `json:"payment-method-subtype,omitempty"`
PaymentMethodType string `json:"payment-method-type,omitempty"`
Value json.Number `json:"value,omitempty"`
}
Limit represents an object's limit instance
type MoneyData ¶
type MoneyData struct {
// Money amount in minor units
Amount int `json:"amount,omitempty"`
// Currency, ISO-4217 format
Currency string `json:"currency,omitempty"`
}
MoneyData structure with detailed fields about transactions amount and currency
type OperationRequestHTTPData ¶
type OperationRequestHTTPData struct {
// contains filtered or unexported fields
}
OperationRequestHTTPData contained with HTTP method (POST, GET) and action URL path for operation (sms, dms_hold)
func (*OperationRequestHTTPData) GetHTTPMethod ¶
func (op *OperationRequestHTTPData) GetHTTPMethod() string
GetHTTPMethod return HTTP method which will be used for send request
func (*OperationRequestHTTPData) GetOperationType ¶
func (op *OperationRequestHTTPData) GetOperationType() OperationType
GetOperationType return part of route path which will be used for send request
func (*OperationRequestHTTPData) SetHTTPMethod ¶
func (op *OperationRequestHTTPData) SetHTTPMethod(method string)
SetHTTPMethod HTTP method which will be used for send request
func (*OperationRequestHTTPData) SetOperationType ¶
func (op *OperationRequestHTTPData) SetOperationType(opt OperationType)
SetOperationType part of route path which will be used for send request
type OperationRequestInterface ¶
type OperationRequestInterface interface {
GetHTTPMethod() string
GetOperationType() OperationType
}
OperationRequestInterface contains two methods, witch allows to get binned information about operation request
type OperationType ¶
type OperationType string
OperationType describes the operation action as string
const ( // SMS transactions request type for url route path SMS OperationType = "sms" // DMSHold transactions request type for url route path DMSHold OperationType = "hold-dms" // DMSCharge transactions request type for url route path DMSCharge OperationType = "charge-dms" // CANCEL transactions request type for url route path CANCEL OperationType = "cancel" // MOTOSMS transactions request type for url route path MOTOSMS OperationType = "moto/sms" // MOTODMS transactions request type for url route path MOTODMS OperationType = "moto/dms" // CREDIT transactions request type for url route path CREDIT OperationType = "credit" // P2P transactions request type for url route path P2P OperationType = "p2p" // B2P transactions request type for url route path B2P OperationType = "b2p" // RecurrentSMS transactions request type for url route path InitRecurrentSMS OperationType = "recurrent/sms/init" // RecurrentSMS transactions request type for url route path RecurrentSMS OperationType = "recurrent/sms" // RecurrentDMS transactions request type for url route path InitRecurrentDMS OperationType = "recurrent/dms/init" // Refund transactions request type for url route path RecurrentDMS OperationType = "recurrent/dms" // Refund transactions request type for url route path Refund OperationType = "refund" // Reversal transactions request type for url route path Reversal OperationType = "reversal" // ExploringStatus is a transaction status request type for url route path ExploringStatus OperationType = "status" // ExploringResult is a transaction result request type for url route path ExploringResult OperationType = "result" // ExploringHistory is a transaction history request type for url route path ExploringHistory OperationType = "history" // ExploringRecurrents is a transaction history request type for url route path ExploringRecurrents OperationType = "recurrents" // ExploringRefunds is a transaction history request type for url route path ExploringRefunds OperationType = "refunds" // ExploringLimits is limits request type for url route path ExploringLimits OperationType = "limits" /* Verification requests */ // Verify card 3-D Secure enrollment request type for url route path Verify3dEnrollment OperationType = "verify/3d-enrollment" // Verify card completion request type for url route path VerifyCard OperationType = "verify/card" /* Tokenization requests */ // Create payment data token url route path CreateToken OperationType = "token/create" /* Reporting requests */ Report OperationType = "report" )
OperationType possible values
type OrderData ¶
type OrderData struct {
// Merchant-side transactions ID
MerchantTransactionID string `json:"merchant-transaction-id,omitempty"`
// Merchant-side user ID
MerchantUserID string `json:"merchant-user-id,omitempty"`
// Merchant-side order ID
OrderID string `json:"order-id,omitempty"`
// Merchant-side order short sms, dms-hold, moto description
OrderDescription string `json:"order-description,omitempty"`
// Merchant-side Key-Value order data
OrderMeta interface{} `json:"order-meta,omitempty"`
// Merchant-side URL
MerchantURL string `json:"merchant-side-url,omitempty"`
// Recipient name
RecipientName string `json:"recipient-name,omitempty"`
// Merchant referring name for dynamic descriptor
MerchantReferringName string `json:"merchant-referring-name,omitempty"`
// Custom return URL after 3D Secure authentification
Custom3dReturnURL string `json:"custom-3d-return-url,omitempty"`
// Custom return URL
CustomReturnURL string `json:"custom-return-url,omitempty"`
// Date after which no further authorizations shall be performed (format: YYYYMMDD)
RecurringExpiry string `json:"recurring-expiry,omitempty"`
// The minimum number of days between authorizations (for variable frequency use 1)
RecurringFrequency string `json:"recurring-frequency,omitempty"`
// Must be set to true for UCOF initialization if any subsequent MIT transactions are supposed to be
MITsExpected bool `json:"mits-expected,omitempty"`
// Must be set to true for initial recurring transaction if amount will not be fixed for subsequent transactions
VariableAmountRecurring bool `json:"variable-amount-recurring,omitempty"`
}
OrderData structure with detailed fields of merchant order (transactions)
type PaymentMethodData ¶
type PaymentMethodData struct {
// Credit card number
Pan string `json:"pan,omitempty"`
// Credit card expiry date in mm/yy format
ExpMmYy string `json:"exp-mm-yy,omitempty"`
// Credit card protection code
Cvv string `json:"cvv,omitempty"`
// Cardholder Name and Surname (Name and Surname on credit card)
CardholderName string `json:"cardholder-name,omitempty"`
// Token (like Google Pay's) AS-IS
Token string `json:"token,omitempty"`
// External 3-D Secure data for an acquirer
ExternalMpiData *ExternalMpiData `json:"external-mpi-data,omitempty"`
// External 3-D Secure data for an acquirer
ExternalTokenData *ExternalTokenData `json:"external-token-data,omitempty"`
}
PaymentMethodData structure with detailed fields of PAN data
type PaymentMethodType ¶ added in v1.7.9
type PaymentMethodType string
const ( PaymentMethodTypeCard PaymentMethodType = "cc" PaymentMethodTypeGooglePay PaymentMethodType = "google_pay" PaymentMethodTypeApplePay PaymentMethodType = "apple_pay" PaymentMethodTypeClick2Pay PaymentMethodType = "click2pay" )
Payment method type allowed values
type QOP ¶
type QOP uint
QOP is a custom type for Authorization header "qop" field
type RequestDigest ¶
type RequestDigest struct {
Secret string
// contains filtered or unexported fields
}
RequestDigest is a functional structure for request Authorization header value creation
func NewRequestDigest ¶
func NewRequestDigest(ObjectGUID, secret, uri string, body []byte) (result *RequestDigest, err error)
NewRequestDigest creates new RequestDigest structure
func (*RequestDigest) CreateHeader ¶
func (o *RequestDigest) CreateHeader() (digest string, err error)
CreateHeader creates a string for Authorization header for a Gateway request
type RequestHTTPData ¶
type RequestHTTPData struct {
// HTTP method
Method string `json:"-"`
// Operation type
OperationType OperationType `json:"-"`
}
RequestHTTPData contains HTTP request method and operationType to append in URL path
type ResponseDigest ¶
type ResponseDigest struct {
Timestamp int
Snonce []byte
OriginalURI string
OriginalCnonce []byte
// contains filtered or unexported fields
}
ResponseDigest is a functional structure for response Authorization header value validation
func NewResponseDigest ¶
func NewResponseDigest(authorizationHeader string) (result *ResponseDigest, err error)
NewResponseDigest parse Authorization header's content and fill ResponseDigest structure
func (*ResponseDigest) Verify ¶
func (o *ResponseDigest) Verify(objectGUID, secret string) (err error)
Verify verifies that parsed response digest was made using given GUID/secret pair. In addition, if set, original request's GUID, URI and cnonce will be compared to parsed values.
type Status ¶
type Status int
Status represents transaction status in the Gateway
const ( StatusInit Status = iota + 1 StatusSent2Bank StatusDmsHoldOK StatusDmsHoldFailed StatusSmsFailed StatusDmsChargeFailed StatusSuccess StatusExpired StatusHoldExpired StatusRefundFailed Status = iota + 2 StatusRefundPending StatusRefundSuccess StatusCardholderOnSite StatusDmsCanceled StatusDmsCancelFailed StatusReversed StatusInputValidationFailed StatusBusinessRulesValidationFailed StatusTerminalGroupSelectFailed StatusTerminalSelectFailed StatusInitParamsInvalid StatusDeclinedByBusinessRulesAction StatusCallbackURLGenerated StatusWaitingCardFormFill StatusMpiURLGenerated StatusWaitingMpi StatusMpiFailed StatusMpiNotReachable StatusCardFormURLSent StatusMpiAuthError StatusAcquirerNotReachable StatusReversalFailed StatusCreditFailed StatusP2PFailed StatusB2PFailed StatusTokenCreated StatusTokenCreateFailed )
Gateway transaction statuses
type SystemData ¶
type SystemData struct {
// Cardholder IPv4 address
UserIP string `json:"user-ip"`
// Cardholder real IPv4 address in case of proxy
XForwardedFor string `json:"x-forwarded-for"`
BrowserAcceptHeader string `json:"browser-accept-header"`
BrowserJavaEnabled bool `json:"browser-java-enabled"`
BrowserJavascriptEnabled bool `json:"browser-javascript-enabled"`
BrowserLanguage string `json:"browser-language"`
BrowserColorDepth string `json:"browser-color-depth"`
BrowserScreenHeight string `json:"browser-screen-height"`
BrowserScreenWidth string `json:"browser-screen-width"`
BrowserTz string `json:"browser-tz"`
BrowserUserAgent string `json:"browser-user-agent"`
}
SystemData structure with fields with customer and merchants IP addressees
type Time ¶
Time is a standard time.Time with custom UnmarshalJSON
func (Time) MarshalJSON ¶
MarshalJSON is a custom marshal function for Time type. Is used to convert Time to Unix timestamp.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshal function for Time type. Is used to create Time from Unix timestamp.
type TransactionHistory ¶
type TransactionHistory struct {
History []HistoryEvent `json:"history,omitempty"`
// contains filtered or unexported fields
}
TransactionHistory represents one item for exploring history collection
type TransactionInfo ¶
type TransactionInfo struct {
AccountGUID string `json:"account-guid,omitempty"`
AcqTerminalID string `json:"acq-terminal-id,omitempty"`
AcqTransactionID string `json:"acq-transaction-id,omitempty"`
Amount json.Number `json:"amount,omitempty"`
ApprovalCode string `json:"approval-code,omitempty"`
CardholderName string `json:"cardholder-name,omitempty"`
Currency string `json:"currency,omitempty"`
DateFinished Time `json:"date-finished,omitempty"`
EciSli string `json:"eci-sli,omitempty"`
GatewayTransactionID string `json:"gateway-transaction-id,omitempty"`
MerchantTransactionID string `json:"merchant-transaction-id,omitempty"`
StatusCode Status `json:"status-code,omitempty"`
StatusCodeGeneral Status `json:"status-code-general,omitempty"`
StatusText string `json:"status-text,omitempty"`
StatusTextGeneral string `json:"status-text-general,omitempty"`
}
TransactionInfo represents one transaction's information
type TransactionRecurrings ¶
type TransactionRecurrings struct {
Subsequent []TransactionInfo `json:"recurrents,omitempty"`
// contains filtered or unexported fields
}
TransactionRecurrings represents one item for exploring recurring transactions collection
type TransactionRefunds ¶
type TransactionRefunds struct {
Refunds []TransactionInfo `json:"refunds,omitempty"`
// contains filtered or unexported fields
}
TransactionRefunds represents one item for exploring refunds collection
type TransactionResponse ¶
type TransactionResponse struct {
Gateway Gateway `json:"gw,omitempty"`
Error Error `json:"error,omitempty"`
AcquirerDetails AcquirerDetails `json:"acquirer-details,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
TransactionResponse is structure of all transaction operations
type TransactionResult ¶
type TransactionResult struct {
DateCreated Time `json:"date-created,omitempty"`
DateFinished Time `json:"date-finished,omitempty"`
ResultData TransactionResponse `json:"result-data,omitempty"`
// contains filtered or unexported fields
}
TransactionResult represents one item for exploring results collection
type TransactionStatus ¶
type TransactionStatus struct {
GatewayTransactionID string `json:"gateway-transaction-id,omitempty"`
StatusCode Status `json:"status-code,omitempty"`
StatusText string `json:"status-text,omitempty"`
StatusCodeGeneral Status `json:"status-code-general,omitempty"`
StatusTextGeneral string `json:"status-text-general,omitempty"`
CardMask string `json:"card-mask,omitempty"`
CardFamily CardFamily `json:"card-family,omitempty"`
}
TransactionStatus represents one item for exploring results collection
type TransactionStatusList ¶
type TransactionStatusList struct {
Status []TransactionStatus `json:"status,omitempty"`
// contains filtered or unexported fields
}
TransactionStatusList represents one item for exploring statuses collection
type URL ¶
URL is a standard url.URL with custom UnmarshalJSON
func (*URL) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshal function for URL type
type Verify3dEnrollmentData ¶
type Verify3dEnrollmentData struct {
// Credit card number
Pan string `json:"pan,omitempty"`
// TerminalMID
TerminalMID string `json:"terminal-mid,omitempty"`
// Currency, ISO-4217 format
Currency string `json:"currency,omitempty"`
}
Verify3dEnrollmentData structure for verify 3-D Secure enrollment request
type VerifyCardData ¶
type VerifyCardData struct {
// Previously created Transaction in Transact Pro system
GWTransactionID string `json:"gateway-transaction-id,omitempty"`
}
VerifyCardData structure for card verification completion request