payments

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Authorized ...
	Authorized string = "Authorized"
	// Canceled ...
	Canceled string = "Canceled"
	// Captured ...
	Captured string = "Captured"
	// Declined ...
	Declined string = "Declined"
	// Expired ...
	Expired string = "Expired"
	// PartiallyCaptured ...
	PartiallyCaptured string = "Partially Captured"
	// PartiallyRefunded ...
	PartiallyRefunded string = "Partially Refunded"
	// Pending ...
	Pending string = "Pending"
	// Refunded ...
	Refunded string = "Refunded"
	// Voided ...
	Voided string = "Voided"
	// CardVerified ...
	CardVerified string = "Card Verified"
	// Chargeback ...
	Chargeback string = "Chargeback"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Accepted

type Accepted struct {
	ActionID  string                 `json:"action_id"`
	Reference string                 `json:"reference"`
	Links     map[string]common.Link `json:"_links"`
}

Accepted ...

type Action

type Action struct {
	ID              string               `json:"id,omitempty"`
	Type            common.PaymentAction `json:"type,omitempty"`
	ProcessedOn     time.Time            `json:"processed_on,omitempty"`
	Amount          uint64               `json:"amount,omitempty"`
	Approved        *bool                `json:"approved,omitempty"`
	AuthCode        string               `json:"auth_code,omitempty"`
	Reference       string               `json:"reference,omitempty"`
	ResponseCode    string               `json:"response_code,omitempty"`
	ResponseSummary *string              `json:"response_summary,omitempty"`
	Processing      *Processing          `json:"processing,omitempty"`
	Metadata        map[string]string    `json:"metadata,omitempty"`
}

Action ...

type ActionSummary

type ActionSummary struct {
	ID              string  `json:"id,omitempty"`
	Type            string  `json:"type,omitempty"`
	ResponseCode    string  `json:"response_code,omitempty"`
	ResponseSummary *string `json:"response_summary,omitempty"`
}

ActionSummary ...

type ActionsResponse

type ActionsResponse struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Actions        []*Action                `json:"actions,omitempty"`
}

ActionsResponse ...

type AlipaySource

type AlipaySource struct {
	Type string `json:"type" binding:"required"`
}

AlipaySource ...

type AlternativePaymentSourceResponse

type AlternativePaymentSourceResponse struct {
	ID             string          `json:"id"`
	Type           string          `json:"type"`
	BillingAddress *common.Address `json:"billing_address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
}

AlternativePaymentSourceResponse ...

type AuthorizationRequest

type AuthorizationRequest struct {
	Amount    uint64                 `json:"amount,omitempty"`
	Reference string                 `json:"reference,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

AuthorizationRequest ..

type AuthorizationResponse

type AuthorizationResponse struct {
	ActionID        string                   `json:"action_id,omitempty"`
	Amount          uint64                   `json:"amount,omitempty"`
	Currency        string                   `json:"currency,omitempty"`
	Approved        *bool                    `json:"approved,omitempty"`
	Status          common.PaymentAction     `json:"status,omitempty"`
	AuthCode        string                   `json:"auth_code,omitempty"`
	ResponseCode    string                   `json:"response_code,omitempty"`
	ResponseSummary string                   `json:"response_summary,omitempty"`
	ExpiresOn       time.Time                `json:"expires_on,omitempty"`
	Balances        *Balances                `json:"balances,omitempty"`
	ProcessedOn     time.Time                `json:"processed_on,omitempty"`
	Reference       string                   `json:"reference,omitempty"`
	Processing      *PaymentProcessing       `json:"processing,omitempty"` // review
	ECI             string                   `json:"eci,omitempty"`
	SchemeID        string                   `json:"scheme_id,omitempty"`
	Risk            RiskAssessment           `json:"risk,omitempty"`
	Links           map[string]common.Link   `json:"_links,omitempty"`
	StatusResponse  *checkout.StatusResponse `json:"api_response,omitempty"`
}

AuthorizationResponse ...

type Balances

type Balances struct {
	TotalAuthorized    uint64 `json:"total_authorized,omitempty"`
	TotalVoided        uint64 `json:"total_voided,omitempty"`
	AvailableToVoid    uint64 `json:"available_to_void,omitempty"`
	TotalCaptured      uint64 `json:"total_captured,omitempty"`
	AvailableToCapture uint64 `json:"available_to_capture,omitempty"`
	TotalRefunded      uint64 `json:"total_refunded,omitempty"`
	AvailableToRefund  uint64 `json:"available_to_refund,omitempty"`
}

type BalotoSource

type BalotoSource struct {
	Type            string `json:"type" binding:"required"`
	IntegrationType string `json:"integration_type" binding:"required"`
	Country         string `json:"country" binding:"required"`
	Description     string `json:"description,omitempty"`
	Payer           *Payer `json:"payer,omitempty"`
}

BalotoSource ...

type BancontactSource

type BancontactSource struct {
	Type              string `json:"type" binding:"required"`
	PaymentCountry    string `json:"payment_country,omitempty"`
	AccountHolderName string `json:"account_holder_name,omitempty"`
	BillingDescriptor string `json:"billing_descriptor,omitempty"`
	Language          string `json:"language,omitempty"`
}

BancontactSource ...

type BenefitpaySource

type BenefitpaySource struct {
	Type            string `json:"type" binding:"required"`
	IntegrationType string `json:"integration_type" binding:"required"`
}

BenefitpaySource ...

type BillingDescriptor

type BillingDescriptor struct {
	Name string `json:"name,omitempty"`
	City string `json:"city,omitempty"`
}

BillingDescriptor ...

type BoletoSource

type BoletoSource struct {
	Type            string `json:"type" binding:"required"`
	IntegrationType string `json:"integration_type" binding:"required"`
	Country         string `json:"country" binding:"required"`
	Description     string `json:"description,omitempty"`
	Payer           *Payer `json:"payer,omitempty"`
}

BoletoSource ...

type CaptureType

type CaptureType string

CaptureType ...

const (
	// NonFinal ...
	NonFinal CaptureType = "NonFinal"
	// Final ...
	Final CaptureType = "Final"
)

func (CaptureType) String

func (c CaptureType) String() string

type CapturesRequest

type CapturesRequest struct {
	Amount      uint64            `json:"amount,omitempty"`
	Reference   string            `json:"reference,omitempty"`
	CaptureType CaptureType       `json:"capture_type,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

CapturesRequest ..

type CapturesResponse

type CapturesResponse struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Accepted       *Accepted                `json:"accepted,omitempty"`
}

CapturesResponse ...

type CardDestination

type CardDestination struct {
	Type           string          `json:"type" binding:"required"`
	Number         string          `json:"number" binding:"required"`
	ExpiryMonth    uint64          `json:"expiry_month" binding:"required"`
	ExpiryYear     uint64          `json:"expiry_year" binding:"required"`
	FirstName      string          `json:"first_name,required"`
	LastName       string          `json:"last_name,required"`
	Name           string          `json:"name,omitempty"`
	BillingAddress *common.Address `json:"billing_address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
}

CardDestination ...

type CardSource

type CardSource struct {
	Type           string          `json:"type" binding:"required"`
	Number         string          `json:"number" binding:"required"`
	ExpiryMonth    uint64          `json:"expiry_month" binding:"required"`
	ExpiryYear     uint64          `json:"expiry_year" binding:"required"`
	Name           string          `json:"name,omitempty"`
	CVV            string          `json:"cvv,omitempty"`
	Stored         *bool           `json:"stored,omitempty"`
	BillingAddress *common.Address `json:"billing_address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
}

CardSource ...

type CardSourceResponse

type CardSourceResponse struct {
	ID                      string              `json:"id,omitempty"`
	Type                    string              `json:"type,omitempty"`
	BillingAddress          *common.Address     `json:"billing_address,omitempty"`
	Phone                   *common.Phone       `json:"phone,omitempty"`
	ExpiryMonth             uint64              `json:"expiry_month,omitempty"`
	ExpiryYear              uint64              `json:"expiry_year,omitempty"`
	Name                    string              `json:"name,omitempty"`
	Scheme                  string              `json:"scheme,omitempty"`
	Last4                   string              `json:"last4,omitempty"`
	Fingerprint             string              `json:"fingerprint,omitempty"`
	Bin                     string              `json:"bin,omitempty"`
	CardType                common.CardType     `json:"card_type,omitempty"`
	CardCategory            common.CardCategory `json:"card_category,omitempty"`
	Issuer                  string              `json:"issuer,omitempty"`
	IssuerCountry           string              `json:"issuer_country,omitempty"`
	ProductID               string              `json:"product_id,omitempty"`
	ProductType             string              `json:"product_type,omitempty"`
	AVSCheck                string              `json:"avs_check,omitempty"`
	CVVCheck                string              `json:"cvv_check,omitempty"`
	PaymentAccountReference string              `json:"payment_account_reference,omitempty"`
	Payouts                 *bool               `json:"payouts,omitempty"`
	FastFunds               string              `json:"fast_funds,omitempty"`
}

CardSourceResponse ...

type ChallengeIndicator

type ChallengeIndicator string
const (
	// NoPreference ...
	NoPreference ChallengeIndicator = "no_preference"
	// NoChallengeRequested ...
	NoChallengeRequested ChallengeIndicator = "no_challenge_requested"
	// ChallengeRequested ...
	ChallengeRequested ChallengeIndicator = "challenge_requested"
	// ChallengeRequestedMandate ...
	ChallengeRequestedMandate ChallengeIndicator = "challenge_requested_mandate"
)

func (ChallengeIndicator) String

func (c ChallengeIndicator) String() string

type Client

type Client struct {
	API checkout.HTTPClient
}

Client ...

func NewClient

func NewClient(config checkout.Config) *Client

NewClient ...

func (*Client) Actions

func (c *Client) Actions(paymentID string) (*ActionsResponse, error)

Actions ...

func (*Client) Captures

func (c *Client) Captures(paymentID string, request *CapturesRequest, params *checkout.Params) (*CapturesResponse, error)

Captures ...

func (*Client) Get

func (c *Client) Get(paymentID string) (*PaymentResponse, error)

Get ...

func (*Client) IncrementAuthorization

func (c *Client) IncrementAuthorization(paymentID string, request *AuthorizationRequest, params *checkout.Params) (*AuthorizationResponse, error)

IncrementAuthorization ...

func (*Client) Refunds

func (c *Client) Refunds(paymentID string, request *RefundsRequest, params *checkout.Params) (*RefundsResponse, error)

Refunds ...

func (*Client) Request

func (c *Client) Request(request *Request, params *checkout.Params) (*Response, error)

Request ...

func (*Client) Voids

func (c *Client) Voids(paymentID string, request *VoidsRequest, params *checkout.Params) (*VoidsResponse, error)

Voids ...

type Customer

type Customer struct {
	ID    string `json:"id,omitempty"`
	Email string `json:"email,omitempty"`
	Name  string `json:"name,omitempty"`
}

Customer ...

type CustomerSource

type CustomerSource struct {
	Type  string `json:"type" binding:"required"`
	ID    string `json:"id,omitempty"`
	Email string `json:"email,omitempty"`
}

CustomerSource ...

type DLocal

type DLocal struct {
	Country      string        `json:"country,omitempty"`
	Payer        *Customer     `json:"payer,omitempty"`
	Installments *Installments `json:"installments,omitempty"`
}

DLocal - Processing information required for dLocal payments.

type Destination

type Destination struct {
	ID     string `json:"id"`
	Amount uint64 `json:"amount"`
}

Destination ...

type DestinationResponse

type DestinationResponse struct {
	ID            string              `json:"id,omitempty"`
	Type          string              `json:"type,omitempty"`
	ExpiryMonth   uint64              `json:"expiry_month,omitempty"`
	ExpiryYear    uint64              `json:"expiry_year,omitempty"`
	Scheme        string              `json:"scheme,omitempty"`
	Last4         string              `json:"last4,omitempty"`
	Fingerprint   string              `json:"fingerprint,omitempty"`
	Bin           string              `json:"bin,omitempty"`
	CardType      common.CardType     `json:"card_type,omitempty"`
	CardCategory  common.CardCategory `json:"card_category,omitempty"`
	Issuer        string              `json:"issuer,omitempty"`
	IssuerCountry string              `json:"issuer_country,omitempty"`
	ProductID     string              `json:"product_id,omitempty"`
	ProductType   string              `json:"product_type,omitempty"`
}

DestinationResponse -

type EPSSource

type EPSSource struct {
	Type    string `json:"type" binding:"required"`
	Purpose string `json:"purpose" binding:"required"`
	BIC     string `json:"bic" binding:"required"`
}

EPSSource -

type Exemption

type Exemption string
const (
	// LowValue ...
	LowValue Exemption = "low_value"
	// SecureCorporatePayment ...
	SecureCorporatePayment Exemption = "secure_corporate_payment"
	// TrustedListing ...
	TrustedListing Exemption = "trusted_listing"
	// TransactionRiskAssessment ...
	TransactionRiskAssessment Exemption = "transaction_risk_assessment"
	// ThreeDSOutage ...
	ThreeDSOutage Exemption = "3ds_outage"
	// SCADelegation ...
	SCADelegation Exemption = "sca_delegation"
	// OutOfSCAScope ...
	OutOfSCAScope Exemption = "out_of_sca_scope"
	// Other ...
	Other Exemption = "other"
	// LowRiskProgram ...
	LowRiskProgram Exemption = "low_risk_program"
)

type FawryProduct

type FawryProduct struct {
	ProductID   string `json:"product_id,omitempty"`
	Quantity    uint64 `json:"quantity,omitempty"`
	Price       uint64 `json:"price,omitempty"`
	Description string `json:"description,omitempty"`
}

FawryProduct ...

type FawrySource

type FawrySource struct {
	Type              string          `json:"type" binding:"required"`
	Description       string          `json:"description,omitempty"`
	CustomerProfileID string          `json:"customer_profile_id,omitempty"`
	CustomerEmail     string          `json:"customer_email,omitempty"`
	CustomerMobile    string          `json:"customer_mobile,omitempty"`
	ExpiresOn         time.Time       `json:"expires_on,omitempty"`
	Products          *[]FawryProduct `json:"products,omitempty"`
}

FawrySource ...

type GiropaySource

type GiropaySource struct {
	Type       string      `json:"type" binding:"required"`
	Purpose    string      `json:"purpose" binding:"required"`
	BIC        string      `json:"bic,omitempty"`
	InfoFields []InfoField `json:"info_fields,omitempty"`
}

GiropaySource ...

type IDDestination

type IDDestination struct {
	Type      string `json:"type" binding:"required"`
	ID        string `json:"id" binding:"required"`
	FirstName string `json:"first_name,required"`
	LastName  string `json:"last_name,required"`
}

IDDestination ...

type IDSource

type IDSource struct {
	Type string `json:"type" binding:"required"`
	ID   string `json:"id" binding:"required"`
	CVV  string `json:"cvv,omitempty"`
}

IDSource ...

type IDealSource

type IDealSource struct {
	Type        string `json:"type" binding:"required"`
	Description string `json:"description,omitempty"`
	BIC         string `json:"bic" binding:"required"`
	Language    string `json:"language,omitempty"`
}

IDealSource ...

type InfoField

type InfoField struct {
	Label string `json:"label,omitempty"`
	Text  string `json:"text,omitempty"`
}

InfoField ...

type Installments

type Installments struct {
	Count string `json:"count,omitempty"`
}

Installments - Details about the installments.

type KNetSource

type KNetSource struct {
	Type              string `json:"type" binding:"required"`
	Language          string `json:"language" binding:"required"`
	UserDefinedField1 string `json:"user_defined_field1,omitempty"`
	UserDefinedField2 string `json:"user_defined_field2,omitempty"`
	UserDefinedField3 string `json:"user_defined_field3,omitempty"`
	UserDefinedField4 string `json:"user_defined_field4,omitempty"`
	UserDefinedField5 string `json:"user_defined_field5,omitempty"`
	CardToken         string `json:"card_token,omitempty"`
	PTLF              string `json:"ptlf,omitempty"`
}

KNetSource ...

type KlarnaAddress

type KlarnaAddress struct {
	Attention        string `json:"attention,omitempty"`
	City             string `json:"city,omitempty"`
	Country          string `json:"country,omitempty"`
	Email            string `json:"email,omitempty"`
	FamilyName       string `json:"family_name,omitempty"`
	GivenName        string `json:"given_name,omitempty"`
	OrganizationName string `json:"organization_name,omitempty"`
	Phone            string `json:"phone,omitempty"`
	PostalCode       string `json:"postal_code,omitempty"`
	Region           string `json:"region,omitempty"`
	StreetAddress    string `json:"street_address,omitempty"`
	StreetAddress2   string `json:"street_address2,omitempty"`
	Title            string `json:"title,omitempty"`
}

KlarnaAddress ...

type KlarnaAttachment

type KlarnaAttachment struct {
	Body        string `json:"body,omitempty"`
	ContentType string `json:"content_type,omitempty"`
}

KlarnaAttachment ...

type KlarnaCustomer

type KlarnaCustomer struct {
	DateOfBirth                  string `json:"date_of_birth,omitempty"`
	Gender                       string `json:"gender,omitempty"`
	LastFourSSN                  string `json:"last_four_ssn,omitempty"`
	NationalIdentificationNumber string `json:"national_identification_number,omitempty"`
	OrganizationEntityType       string `json:"organization_entity_type,omitempty"`
	OrganizationRegistrationID   string `json:"organization_registration_id,omitempty"`
	Title                        string `json:"title,omitempty"`
	Type                         string `json:"type,omitempty"`
	VatID                        string `json:"vat_id,omitempty"`
}

KlarnaCustomer ...

type KlarnaProduct

type KlarnaProduct struct {
	ImageURL            string                    `json:"image_url,omitempty"`
	MerchantData        string                    `json:"merchant_data,omitempty"`
	Name                string                    `json:"name,omitempty"`
	ProductIdentifiers  *KlarnaProductIdentifiers `json:"product_identifiers,omitempty"`
	ProductURL          string                    `json:"product_url,omitempty"`
	Quantity            uint64                    `json:"quantity,omitempty"`
	QuantityUnit        string                    `json:"quantity_unit,omitempty"`
	Reference           string                    `json:"reference,omitempty"`
	TaxRate             uint64                    `json:"tax_rate,omitempty"`
	TotalAmount         uint64                    `json:"total_amount,omitempty"`
	TotalDiscountAmount uint64                    `json:"total_discount_amount,omitempty"`
	TotalTaxAmount      uint64                    `json:"total_tax_amount,omitempty"`
	Type                string                    `json:"type,omitempty"`
	UnitPrice           uint64                    `json:"unit_price,omitempty"`
}

KlarnaProduct ...

type KlarnaProductIdentifiers

type KlarnaProductIdentifiers struct {
	Brand                  string `json:"brand,omitempty"`
	CategoryPath           string `json:"category_path,omitempty"`
	GlobalTradeItemNumber  string `json:"global_trade_item_number,omitempty"`
	ManufacturerPartNumber string `json:"manufacturer_part_number,omitempty"`
}

KlarnaProductIdentifiers ...

type KlarnaSource

type KlarnaSource struct {
	Type               string            `json:"type" binding:"required"`
	AuthorizationToken string            `json:"authorization_token" binding:"required"`
	Locale             string            `json:"locale" binding:"required"`
	PurchaseCountry    string            `json:"purchase_country" binding:"required"`
	AutoCapture        string            `json:"auto_capture,omitempty"`
	BillingAddress     *KlarnaAddress    `json:"billing_address,omitempty"`
	ShippingAddress    *KlarnaAddress    `json:"shipping_address,omitempty"`
	TaxAmount          uint64            `json:"tax_amount,omitempty"`
	Product            *KlarnaProduct    `json:"products,omitempty"`
	Customer           *KlarnaCustomer   `json:"customer,omitempty"`
	MerchantReference1 string            `json:"merchant_reference1,omitempty"`
	MerchantReference2 string            `json:"merchant_reference2,omitempty"`
	MerchantData       string            `json:"merchant_data,omitempty"`
	Attachment         *KlarnaAttachment `json:"attachment,omitempty"`
}

KlarnaSource ...

type MultibancoSource

type MultibancoSource struct {
	Type              string `json:"type" binding:"required"`
	PaymentCountry    string `json:"payment_country,omitempty"`
	AccountHolderName string `json:"account_holder_name,omitempty"`
	BillingDescriptor string `json:"billing_descriptor,omitempty"`
}

MultibancoSource ...

type NetworkTokenSource

type NetworkTokenSource struct {
	Type           string          `json:"type" binding:"required"`
	Token          string          `json:"token" binding:"required"`
	ExpiryMonth    uint64          `json:"expiry_month" binding:"required"`
	ExpiryYear     uint64          `json:"expiry_year" binding:"required"`
	TokenType      string          `json:"token_type" binding:"required"`
	Cryptogram     string          `json:"cryptogram" binding:"required"`
	ECI            string          `json:"eci" binding:"required"`
	Stored         *bool           `json:"stored,omitempty"`
	Name           string          `json:"name,omitempty"`
	CVV            string          `json:"cvv,omitempty"`
	BillingAddress *common.Address `json:"billing_address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
}

NetworkTokenSource ...

type OxxoSource

type OxxoSource struct {
	Type            string `json:"type" binding:"required"`
	IntegrationType string `json:"integration_type" binding:"required"`
	Country         string `json:"country,omitempty"`
	Description     string `json:"description,omitempty"`
	Payer           *Payer `json:"payer,omitempty"`
}

OxxoSource ...

type P24Source

type P24Source struct {
	Type               string `json:"type" binding:"required"`
	PaymentCountry     string `json:"payment_country" binding:"required"`
	AccountHolderName  string `json:"account_holder_name,omitempty"`
	AccountHolderEmail string `json:"account_holder_email,omitempty"`
	BillingDescriptor  string `json:"billing_descriptor,omitempty"`
}

P24Source ...

type PagofacilSource

type PagofacilSource struct {
	Type            string `json:"type" binding:"required"`
	IntegrationType string `json:"integration_type" binding:"required"`
	Country         string `json:"country,omitempty"`
	Description     string `json:"description,omitempty"`
	Payer           *Payer `json:"payer,omitempty"`
}

PagofacilSource ...

type PayPalSource

type PayPalSource struct {
	Type string       `json:"type" binding:"required"`
	Plan *common.Plan `json:"plan,omitempty"`
}

PayPalSource ...

type Payer

type Payer struct {
	Name     string `json:"name" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Document string `json:"document" binding:"required"`
}

Payer -

type Payment

type Payment struct {
	ID                string               `json:"id,omitempty"`
	RequestedOn       time.Time            `json:"requested_on,omitempty"`
	Source            *SourceResponse      `json:"source,omitempty"`
	Amount            uint64               `json:"amount,omitempty"`
	Currency          string               `json:"currency,omitempty"`
	PaymentType       common.PaymentType   `json:"payment_type,omitempty"`
	Reference         string               `json:"reference,omitempty"`
	Description       string               `json:"description,omitempty"`
	Approved          *bool                `json:"approved,omitempty"`
	Status            common.PaymentAction `json:"status,omitempty"`
	ThreeDS           *ThreeDSEnrollment   `json:"3ds,omitempty"`
	Risk              *RiskAssessment      `json:"risk,omitempty"`
	Customer          *Customer            `json:"customer,omitempty"`
	BillingDescriptor *BillingDescriptor   `json:"billing_descriptor,omitempty"`
	Shipping          *Shipping            `json:"shipping,omitempty"`
	PaymentIP         string               `json:"payment_ip,omitempty"`
	Recipient         *Recipient           `json:"recipient,omitempty"`
	Metadata          map[string]string    `json:"metadata,omitempty"`
	ECI               string               `json:"eci,omitempty"`
	Actions           []ActionSummary      `json:"actions,omitempty"`
	SchemeID          string               `json:"scheme_id,omitempty"`
}

Payment ...

type PaymentPending

type PaymentPending struct {
	ID        string                 `json:"id,omitempty"`
	Status    common.PaymentAction   `json:"status,omitempty"`
	Reference string                 `json:"reference,omitempty"`
	Customer  *Customer              `json:"customer,omitempty"`
	ThreeDS   *ThreeDSEnrollment     `json:"3ds,omitempty"`
	Links     map[string]common.Link `json:"_links,omitempty"`
}

PaymentPending ...

type PaymentProcessing

type PaymentProcessing struct {
	RetrievalReferenceNumber string `json:"retrieval_reference_number,omitempty"`
	AcquirerTransactionId    string `json:"acquirer_transaction_id,omitempty"`
	RecommendationCode       string `json:"recommendation_code,omitempty"`
}

type PaymentResponse

type PaymentResponse struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Payment        *Payment                 `json:"payment,omitempty"`
}

PaymentResponse ...

type PoliSource

type PoliSource struct {
	Type string `json:"type" binding:"required"`
}

PoliSource ...

type Processed

type Processed struct {
	ID                string                 `json:"id,omitempty"`
	ActionID          string                 `json:"action_id,omitempty"`
	Amount            uint64                 `json:"amount,omitempty"`
	Currency          string                 `json:"currency,omitempty"`
	Approved          *bool                  `json:"approved,omitempty"`
	Status            common.PaymentAction   `json:"status,omitempty"`
	AuthCode          string                 `json:"auth_code,omitempty"`
	ResponseCode      string                 `json:"response_code,omitempty"`
	ResponseSummary   string                 `json:"response_summary,omitempty"`
	ThreeDSEnrollment *ThreeDSEnrollment     `json:"3ds,omitempty"`
	Flagged           *bool                  `json:"flagged,omitempty"`
	RiskAssessment    *RiskAssessment        `json:"risk,omitempty"`
	Source            *SourceResponse        `json:"source,omitempty"`
	Destination       *DestinationResponse   `json:"destination,omitempty"`
	Customer          *Customer              `json:"customer,omitempty"`
	ProcessedOn       time.Time              `json:"processed_on,omitempty"`
	Reference         string                 `json:"reference,omitempty"`
	Processing        *Processing            `json:"processing,omitempty"`
	ECI               string                 `json:"eci,omitempty"`
	SchemeID          string                 `json:"scheme_id,omitempty"`
	Links             map[string]common.Link `json:"_links,omitempty"`
}

Processed ...

type Processing

type Processing struct {
	Mid                      string             `json:"mid,omitempty"`
	Aft                      *bool              `json:"aft,omitempty"`
	DLocal                   *DLocal            `json:"dlocal,omitempty"`
	AcquirerTransactionID    string             `json:"acquirer_transaction_id,omitempty"`
	AcquirerReferenceNumber  string             `json:"acquirer_reference_number,omitempty"`
	RetrievalReferenceNumber string             `json:"retrieval_reference_number,omitempty"`
	SenderInformation        *SenderInformation `json:"senderInformation,omitempty"`
}

Processing - Use the processing object to influence or override the data sent during card processing

type QPaySource

type QPaySource struct {
	Type        string `json:"type" binding:"required"`
	Quantity    uint64 `json:"quantity,omitempty"`
	Description string `json:"description,omitempty"`
	Language    string `json:"language,omitempty"`
	NationalID  string `json:"national_id,omitempty"`
}

QPaySource ...

type RapipagoSource

type RapipagoSource struct {
	Type            string `json:"type" binding:"required"`
	IntegrationType string `json:"integration_type" binding:"required"`
	Country         string `json:"country,omitempty"`
	Description     string `json:"description,omitempty"`
	Payer           *Payer `json:"payer,omitempty"`
}

RapipagoSource ...

type Recipient

type Recipient struct {
	DOB           string `json:"dob"`
	AccountNumber string `json:"account_number"`
	ZIP           string `json:"zip"`
	LastName      string `json:"last_name"`
}

Recipient ...

type RefundsRequest

type RefundsRequest struct {
	Amount    uint64            `json:"amount,omitempty"`
	Reference string            `json:"reference,omitempty"`
	Metadata  map[string]string `json:"metadata,omitempty"`
}

RefundsRequest ..

type RefundsResponse

type RefundsResponse struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Accepted       *Accepted                `json:"accepted,omitempty"`
}

RefundsResponse ...

type Request

type Request struct {
	Source            interface{}        `json:"source,omitempty"`
	Destination       interface{}        `json:"destination,omitempty"`
	Amount            uint64             `json:"amount,omitempty"`
	Currency          string             `json:"currency"`
	Reference         string             `json:"reference,omitempty"`
	PaymentType       common.PaymentType `json:"payment_type,omitempty"`
	MerchantInitiated *bool              `json:"merchant_initiated,omitempty"`
	Description       string             `json:"description,omitempty"`
	Capture           *bool              `json:"capture,omitempty"`
	CaptureOn         *time.Time         `json:"capture_on,omitempty"`
	Customer          *Customer          `json:"customer,omitempty"`
	BillingDescriptor *BillingDescriptor `json:"billing_descriptor,omitempty"`
	Shipping          *Shipping          `json:"shipping,omitempty"`
	ThreeDS           *ThreeDS           `json:"3ds,omitempty"`
	PreviousPaymentID string             `json:"previous_payment_id,omitempty"`
	Risk              *Risk              `json:"risk,omitempty"`
	SuccessURL        string             `json:"success_url,omitempty,omitempty"`
	FailureURL        string             `json:"failure_url,omitempty,omitempty"`
	PaymentIP         string             `json:"payment_ip,omitempty"`
	Recipient         *Recipient         `json:"recipient,omitempty"`
	Destinations      []*Destination     `json:"destinations,omitempty"`
	Processing        *Processing        `json:"processing,omitempty"`
	FundTransferType  string             `json:"fund_transfer_type,omitempty"`
	Metadata          map[string]string  `json:"metadata,omitempty"`
	// FOUR only
	AuthorizationType   string `json:"authorization_type,omitempty"`
	ProcessingChannelId string `json:"processing_channel_id,omitempty"`
}

Request ...

func (*Request) SetDestination

func (r *Request) SetDestination(d interface{}) error

SetDestination ...

func (*Request) SetSource

func (r *Request) SetSource(s interface{}) error

SetSource ...

type Response

type Response struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Processed      *Processed               `json:"processed,omitempty"`
	Pending        *PaymentPending          `json:"pending,omitempty"`
}

Response ...

type Risk

type Risk struct {
	Enabled *bool `json:"enabled,omitempty"`
}

Risk ...

type RiskAssessment

type RiskAssessment struct {
	Flagged *bool `json:"flagged,omitempty"`
}

RiskAssessment ...

type SenderInformation

type SenderInformation struct {
	FirstName     string `json:"firstName" binding:"required"`
	LastName      string `json:"lastName" binding:"required"`
	Address       string `json:"address" binding:"required"`
	City          string `json:"city,omitempty"`
	State         string `json:"state,omitempty"`
	PostalCode    string `json:"postalCode" binding:"required"`
	Country       string `json:"country" binding:"required"`
	SourceOfFunds string `json:"sourceOfFunds" binding:"required"`
	AccountNumber string `json:"accountNumber" binding:"required"`
	Reference     string `json:"reference" binding:"required"`
}

SenderInformation -

type Shipping

type Shipping struct {
	Address *common.Address `json:"address,omitempty"`
	Phone   *common.Phone   `json:"phone,omitempty"`
}

Shipping ...

type SofortSource

type SofortSource struct {
	Type string `json:"type" binding:"required"`
}

SofortSource ...

type SourceResponse

type SourceResponse struct {
	*CardSourceResponse
	*AlternativePaymentSourceResponse
}

SourceResponse ...

func (*SourceResponse) MarshalJSON

func (s *SourceResponse) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*SourceResponse) UnmarshalJSON

func (s *SourceResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type ThreeDS

type ThreeDS struct {
	Enabled            *bool              `json:"enabled,omitempty"`
	AttemptN3d         *bool              `json:"attempt_n3d,omitempty"`
	ECI                string             `json:"eci,omitempty"`
	Cryptogram         string             `json:"cryptogram,omitempty"`
	XID                string             `json:"xid,omitempty"`
	Version            string             `json:"version,omitempty"`
	Exemption          Exemption          `json:"exemption,omitempty"`
	ChallengeIndicator ChallengeIndicator `json:"challenge_indicator,omitempty"`
}

ThreeDS ...

type ThreeDSEnrollment

type ThreeDSEnrollment struct {
	Downgraded             *bool  `json:"downgraded,omitempty"`
	Enrolled               string `json:"enrolled,omitempty"`
	SignatureValid         string `json:"signature_valid,omitempty"`
	AuthenticationResponse string `json:"authentication_response,omitempty"`
	Cryptogram             string `json:"cryptogram,omitempty"`
	XID                    string `json:"xid,omitempty"`
}

ThreeDSEnrollment : 3D-Secure Enrollment Data

type TokenDestination

type TokenDestination struct {
	Type           string          `json:"type" binding:"required"`
	Token          string          `json:"token" binding:"required"`
	FirstName      string          `json:"first_name" binding:"required"`
	LastName       string          `json:"last_name" binding:"required"`
	BillingAddress *common.Address `json:"billing_address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
}

TokenDestination ...

type TokenSource

type TokenSource struct {
	Type              string          `json:"type" binding:"required"`
	Token             string          `json:"token" binding:"required"`
	BillingAddress    *common.Address `json:"billing_address,omitempty"`
	Phone             *common.Phone   `json:"phone,omitempty"`
	StoreForFutureUse bool            `json:"store_for_future_use,omitempty"`
}

TokenSource ...

type VoidsRequest

type VoidsRequest struct {
	Reference string            `json:"reference,omitempty"`
	Metadata  map[string]string `json:"metadata,omitempty"`
}

VoidsRequest ...

type VoidsResponse

type VoidsResponse struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Accepted       *Accepted                `json:"accepted,omitempty"`
}

VoidsResponse ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL