Documentation ¶
Index ¶
Constants ¶
const ( PaymentStatusSuccess string = "success" PaymentStatusDecline string = "decline" PaymentStatusAW3DS string = "awaiting 3ds result" PaymentStatusAWRedirect string = "awaiting redirect result" PaymentStatusAWCustomer string = "awaiting customer" PaymentStatusAWClarification string = "awaiting clarification" PaymentStatusAWCapture string = "awaiting capture" PaymentStatusCancelled string = "cancelled" PaymentStatusRefunded string = "refunded" PaymentStatusPartiallyRefunded string = "partially refunded" PaymentStatusProcessing string = "processing" PaymentStatusError string = "error" PaymentStatusReversed string = "reversed" )
Constants with possible statuses of payment
const ( ParamProjectId string = "project_id" ParamPaymentId string = "payment_id" ParamPaymentAmount string = "payment_amount" ParamPaymentCurrency string = "payment_currency" ParamPaymentDescription string = "payment_description" ParamAccountToken string = "account_token" ParamCardOperationType string = "card_operation_type" ParamBestBefore string = "best_before" ParamCloseOnMissclick string = "close_on_missclick" ParamCssModalWrap string = "css_modal_wrap" ParamCustomerId string = "customer_id" ParamForceAcsNewWindow string = "force_acs_new_window" ParamForcePaymentMethod string = "force_payment_method" ParamLanguageCode string = "language_code" ParamListPaymentBlock string = "list_payment_block" ParamMerchantFailUrl string = "merchant_fail_url" ParamMerchantSuccessUrl string = "merchant_success_url" ParamMode string = "mode" ParamRecurringRegister string = "recurring_register" ParamCustomerFirstName string = "customer_first_name" ParamCustomerLastName string = "customer_last_name" ParamCustomerPhone string = "customer_phone" ParamCustomerEmail string = "customer_email" ParamCustomerCountry string = "customer_country" ParamCustomerState string = "customer_state" ParamCustomerCity string = "customer_city" ParamCustomerDayOfBirth string = "customer_day_of_birth" ParamCustomerSsn string = "customer_ssn" ParamBillingPostal string = "billing_postal" ParamBillingCountry string = "billing_country" ParamBillingRegion string = "billing_region" ParamBillingCity string = "billing_city" ParamBillingAddress string = "billing_address" ParamRedirect string = "redirect" ParamRedirectFailMode string = "redirect_fail_mode" ParamRedirectFailUrl string = "redirect_fail_url" ParamRedirectOnMobile string = "redirect_on_mobile" ParamRedirectSuccessMode string = "redirect_success_mode" ParamRedirectSuccessUrl string = "redirect_success_url" ParamRedirectTokenizeMode string = "redirect_tokenize_mode" ParamRedirectTokenizeUrl string = "redirect_tokenize_url" ParamRegionCode string = "region_code" ParamTargetElement string = "target_element" ParamTerminalId string = "terminal_id" ParamBaseUrl string = "baseurl" ParamPaymentExtraParam string = "payment_extra_param" PaymentTypePurchase string = "purchase" PaymentTypePayout string = "payout" PaymentTypeRecurring string = "recurring" )
Constants with possible payment params and types of payment
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback struct {
// contains filtered or unexported fields
}
Structure for processing callbacks
func NewCallback ¶
func NewCallback(signatureHandler SignatureHandler, callbackData string) (*Callback, error)
Constructor for Callback structure
func (*Callback) GetPayment ¶
func (c *Callback) GetPayment() interface{}
Return map with payment data
func (*Callback) GetPaymentStatus ¶
func (c *Callback) GetPaymentStatus() interface{}
Return payment status
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Structure for communicate with our
func (*Gate) GetPaymentPageUrl ¶
Method build payment URL
func (*Gate) HandleCallback ¶
Method for handling callback
func (*Gate) SetBaseUrl ¶
Method for set base payment page URL
type Payment ¶
type Payment struct {
// contains filtered or unexported fields
}
Structure for preparing payment params
func NewPayment ¶
Constructor for Payment structure
type PaymentPage ¶
type PaymentPage struct {
// contains filtered or unexported fields
}
Structure for build payment URL
func NewPaymentPage ¶
func NewPaymentPage(signatureHandler SignatureHandler) *PaymentPage
Constructor for PaymentPage structure
func (*PaymentPage) GetUrl ¶
func (p *PaymentPage) GetUrl(payment Payment) string
Method build payment URL
func (*PaymentPage) SetBaseUrl ¶
func (p *PaymentPage) SetBaseUrl(baseUrl string) *PaymentPage
Method for set base payment page URL
type SignatureHandler ¶
type SignatureHandler struct {
// contains filtered or unexported fields
}
Structure for make/check signature
func NewSignatureHandler ¶
func NewSignatureHandler(secret string) *SignatureHandler
Constructor for SignatureHandler structure
func (*SignatureHandler) Check ¶
func (s *SignatureHandler) Check(signature string, params map[string]interface{}) bool
Method for check signature
func (*SignatureHandler) SetSort ¶
func (s *SignatureHandler) SetSort(sort bool) *SignatureHandler
Setter for sort flag
func (*SignatureHandler) Sign ¶
func (s *SignatureHandler) Sign(params map[string]interface{}) string
Method for make signature