payments

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 2 Imported by: 7

Documentation

Index

Constants

View Source
const PathPayments = "payments"

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType added in v1.0.0

type ActionType string
const (
	AuthorizationYes ActionType = "Authorization"
	CardVerification ActionType = "Card Verification"
	Void             ActionType = "Void"
	Capture          ActionType = "Capture"
	Refund           ActionType = "Refund"
	Payout           ActionType = "Payout"
	Return           ActionType = "Return"
)

type AirlineData added in v1.0.0

type AirlineData struct {
	Ticket           *Ticket            `json:"ticket,omitempty"`
	Passenger        *Passenger         `json:"passenger,omitempty"`
	FlightLegDetails []FlightLegDetails `json:"flight_leg_details,omitempty"`
}

type BillingDescriptor

type BillingDescriptor struct {
	Name string `json:"name,omitempty"`
	City string `json:"city,omitempty"`
	// Not available on Previous
	Reference string `json:"reference,omitempty"`
}

type BillingInformation added in v1.0.0

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

type CaptureResponse added in v1.0.0

type CaptureResponse struct {
	HttpMetadata common.HttpMetadata
	ActionId     string                 `json:"action_id,omitempty"`
	Reference    string                 `json:"reference,omitempty"`
	Links        map[string]common.Link `json:"_links"`
}

Response

type DLocalProcessingSettings added in v1.0.0

type DLocalProcessingSettings struct {
	Country      common.Country `json:"country,omitempty"`
	Payer        Payer          `json:"payer,omitempty"`
	Installments *Installments  `json:"installments,omitempty"`
}

type Destination

type Destination interface {
	GetType() DestinationType
}

type DestinationType added in v1.0.1

type DestinationType string
const (
	BankAccountDestination DestinationType = "bank_account"
	CardDestination        DestinationType = "card"
	IdDestination          DestinationType = "id"
	TokenDestination       DestinationType = "token"
)

type DestinationTypeMapping added in v1.0.0

type DestinationTypeMapping struct {
	Destination string `json:"destination"`
}

type Exemption added in v0.0.22

type Exemption string
const (
	None                      Exemption = "none"
	LowValue                  Exemption = "low_value"
	RecurringOperation        Exemption = "recurring_operation"
	TransactionRiskAssessment Exemption = "transaction_risk_assessment"
	SecureCorporatePayment    Exemption = "secure_corporate_payment"
	TrustedListing            Exemption = "trusted_listing"
	ThreeDsOutage             Exemption = "3ds_outage"
	ScaDelegation             Exemption = "sca_delegation"
	OutOfScaScope             Exemption = "out_of_sca_scope"
	Other                     Exemption = "other"
	LowRiskProgram            Exemption = "low_risk_program"
)

type FlightLegDetails added in v1.0.0

type FlightLegDetails struct {
	FlightNumber     int64  `json:"flight_number,omitempty"`
	CarrierCode      string `json:"carrier_code,omitempty"`
	ServiceClass     string `json:"service_class,omitempty"`
	DepartureDate    string `json:"departure_date,omitempty"`
	DepartureTime    string `json:"departure_time,omitempty"`
	DepartureAirport string `json:"departure_airport,omitempty"`
	ArrivalAirport   string `json:"arrival_airport,omitempty"`
	StopoverCode     string `json:"stopover_code,omitempty"`
	FareBasisCode    string `json:"fare_basis_code,omitempty"`
}

type FundTransferType added in v1.0.1

type FundTransferType string
const (
	AA  FundTransferType = "AA"
	PP  FundTransferType = "PP"
	FT  FundTransferType = "FT"
	FD  FundTransferType = "FD"
	PD  FundTransferType = "PD"
	LO  FundTransferType = "LO"
	OG  FundTransferType = "OG"
	CO4 FundTransferType = "CO4"
	CO7 FundTransferType = "CO7"
	C52 FundTransferType = "C52"
	C55 FundTransferType = "C55"
)

type Installments

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

type MerchantInitiatedReason added in v1.0.0

type MerchantInitiatedReason string
const (
	DelayedCharge   MerchantInitiatedReason = "Delayed_charge"
	Resubmission    MerchantInitiatedReason = "Resubmission"
	NoShow          MerchantInitiatedReason = "No_show"
	Reauthorization MerchantInitiatedReason = "Reauthorization"
)

type NetworkTokenType added in v1.0.0

type NetworkTokenType string
const (
	Vts       NetworkTokenType = "vts"
	Mdes      NetworkTokenType = "mdes"
	ApplePay  NetworkTokenType = "applepay"
	GooglePay NetworkTokenType = "googlepay"
)

type OsType added in v1.0.0

type OsType string
const (
	Android OsType = "ANDROID"
	Ios     OsType = "IOS"
)

type Passenger added in v1.0.0

type Passenger struct {
	Name        *PassengerName `json:"name,omitempty"`
	DateOfBirth string         `json:"date_of_birth,omitempty"`
	CountryCode common.Country `json:"country_code,omitempty"`
}

type PassengerName added in v1.0.0

type PassengerName struct {
	FullName string `json:"full_name,omitempty"`
}

type Payer

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

type PaymentActionSummary added in v1.0.0

type PaymentActionSummary struct {
	Id              string     `json:"id,omitempty"`
	Type            ActionType `json:"type,omitempty"`
	ResponseCode    string     `json:"response_code,omitempty"`
	ResponseSummary string     `json:"response_summary,omitempty"`
}

type PaymentProcessing added in v0.0.20

type PaymentProcessing struct {
	RetrievalReferenceNumber string `json:"retrieval_reference_number,omitempty"`
	AcquirerTransactionId    string `json:"acquirer_transaction_id,omitempty"`
	RecommendationCode       string `json:"recommendation_code,omitempty"`
	PartnerOrderId           string `json:"partner_order_id,omitempty"`
	PartnerSessionId         string `json:"partner_session_id,omitempty"`
	PartnerClientToken       string `json:"partner_client_token,omitempty"`
	PartnerPaymentId         string `json:"partner_payment_id,omitempty"`
	ContinuationPayload      string `json:"continuation_payload,omitempty"`
	Pun                      string `json:"pun,omitempty"`
}

type PaymentRecipient added in v1.0.0

type PaymentRecipient struct {
	DateOfBirth   string         `json:"dob,omitempty"`
	AccountNumber string         `json:"account_number,omitempty"`
	CountryCode   common.Country `json:"country_code,omitempty"`
	Zip           string         `json:"zip,omitempty"`
	FirstName     string         `json:"first_name,omitempty"`
	LastName      string         `json:"last_name,omitempty"`
}

type PaymentSource added in v1.0.1

type PaymentSource interface {
	GetType() SourceType
}

type PaymentStatus added in v1.0.0

type PaymentStatus string
const (
	Active            PaymentStatus = "Active"
	Pending           PaymentStatus = "Pending"
	Authorized        PaymentStatus = "Authorized"
	CardVerified      PaymentStatus = "Card Verified"
	Voided            PaymentStatus = "Voided"
	PartiallyCaptured PaymentStatus = "Partially Captured"
	Captured          PaymentStatus = "Captured"
	PartiallyRefunded PaymentStatus = "Partially Refunded"
	Refunded          PaymentStatus = "Refunded"
	Declined          PaymentStatus = "Declined"
	Canceled          PaymentStatus = "Canceled"
	Expired           PaymentStatus = "Expired"
	Requested         PaymentStatus = "Requested"
)

type PaymentType added in v1.0.0

type PaymentType string
const (
	Regular     PaymentType = "Regular"
	Recurring   PaymentType = "Recurring"
	MOTO        PaymentType = "MOTO"
	Installment PaymentType = "Installment"
)

type PreferredSchema added in v1.0.0

type PreferredSchema string
const (
	Visa            PreferredSchema = "visa"
	Mastercard      PreferredSchema = "mastercard"
	CartesBancaires PreferredSchema = "cartes_bancaires"
)

type Processing

type Processing struct {
	AcquirerReferenceNumber  string     `json:"acquirer_reference_number,omitempty"`
	RetrievalReferenceNumber ActionType `json:"retrieval_reference_number,omitempty"`
	AcquirerTransactionId    string     `json:"acquirer_transaction_id,omitempty"`
}

type ProcessingData added in v1.0.0

type ProcessingData struct {
	PreferredScheme                 PreferredSchema                  `json:"preferred_scheme,omitempty"`
	AppId                           string                           `json:"app_id,omitempty"`
	PartnerCustomerId               string                           `json:"partner_customer_id,omitempty"`
	PartnerPaymentId                string                           `json:"partner_payment_id,omitempty"`
	TaxAmount                       int64                            `json:"tax_amount,omitempty"`
	PurchaseCountry                 common.Country                   `json:"purchase_country,omitempty"`
	Locale                          string                           `json:"locale,omitempty"`
	PartnerOrderId                  string                           `json:"partner_order_id,omitempty"`
	FraudStatus                     string                           `json:"fraud_status,omitempty"`
	ProviderAuthorizedPaymentMethod *ProviderAuthorizedPaymentMethod `json:"provider_authorized_payment_method,omitempty"`
	CustomPaymentMethodIds          []string                         `json:"custom_payment_method_ids,omitempty"`
}

Response

type ProcessingSettings added in v1.0.0

type ProcessingSettings struct {
	OrderId                 string                    `json:"order_id,omitempty"`
	TaxAmount               int64                     `json:"tax_amount,omitempty"`
	DiscountAmount          int64                     `json:"discount_amount,omitempty"`
	DutyAmount              int64                     `json:"duty_amount,omitempty"`
	ShippingAmount          int64                     `json:"shipping_amount,omitempty"`
	ShippingTaxAmount       int64                     `json:"shipping_tax_amount,omitempty"`
	Aft                     bool                      `json:"aft,omitempty"`
	PreferredScheme         PreferredSchema           `json:"preferred_scheme,omitempty"`
	MerchantInitiatedReason MerchantInitiatedReason   `json:"merchant_initiated_reason,omitempty"`
	CampaignId              int64                     `json:"campaign_id,omitempty"`
	ProductType             ProductType               `json:"product_type,omitempty"`
	OpenId                  string                    `json:"open_id,omitempty"`
	OriginalOrderAmount     int64                     `json:"original_order_amount,omitempty"`
	ReceiptId               string                    `json:"receipt_id,omitempty"`
	TerminalType            TerminalType              `json:"terminal_type,omitempty"`
	OsType                  OsType                    `json:"os_type,omitempty"`
	InvoiceId               string                    `json:"invoice_id,omitempty"`
	BrandName               string                    `json:"brand_name,omitempty"`
	Locale                  string                    `json:"locale,omitempty"`
	ShippingPreference      ShippingPreference        `json:"shipping_preference,omitempty"`
	UserAction              UserAction                `json:"user_action,omitempty"`
	SetTransactionContext   []map[string]string       `json:"set_transaction_context,omitempty"`
	AirlineData             []AirlineData             `json:"airline_data,omitempty"`
	OtpValue                string                    `json:"otp_value,omitempty"`
	PurchaseCountry         common.Country            `json:"purchase_country,omitempty"`
	CustomPaymentMethodIds  []string                  `json:"custom_payment_method_ids,omitempty"`
	ShippingDelay           int64                     `json:"shipping_delay,omitempty"`
	ShippingInfo            string                    `json:"shipping_info,omitempty"`
	Dlocal                  *DLocalProcessingSettings `json:"dlocal,omitempty"`
}

type Product added in v1.0.0

type Product struct {
	Name           string `json:"name,omitempty"`
	Quantity       int    `json:"quantity,omitempty"`
	UnitPrice      int    `json:"unit_price,omitempty"`
	Price          int    `json:"price,omitempty"`
	Reference      string `json:"reference,omitempty"`
	CommodityCode  string `json:"commodity_code,omitempty"`
	UnitOfMeasure  string `json:"unit_of_measure,omitempty"`
	TotalAmount    int64  `json:"total_amount,omitempty"`
	TaxAmount      int64  `json:"tax_amount,omitempty"`
	DiscountAmount int64  `json:"discount_amount,omitempty"`
	WxpayGoodsId   string `json:"wxpay_goods_id,omitempty"`
	ImageUrl       string `json:"image_url,omitempty"`
	Url            string `json:"url,omitempty"`
	Sku            string `json:"sku,omitempty"`
}

type ProductType added in v1.0.0

type ProductType string
const (
	QrCode          ProductType = "QR Code"
	InApp           ProductType = "In-App"
	OfficialAccount ProductType = "Official Account"
	MiniProgram     ProductType = "Mini Program"
)

type ProviderAuthorizedPaymentMethod added in v1.0.0

type ProviderAuthorizedPaymentMethod struct {
	Type                 string `json:"type,omitempty"`
	Description          string `json:"description,omitempty"`
	NumberOfInstallments int64  `json:"number_of_installments,omitempty"`
	NumberOfDays         int64  `json:"number_of_days,omitempty"`
}

Response

type QueryRequest added in v1.0.0

type QueryRequest struct {
	Limit     int    `url:"limit,10"`
	Skip      int    `url:"skip,0"`
	Reference string `url:"reference,omitempty"`
}

Request

type RefundRequest added in v1.0.0

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

Request

type RefundResponse added in v1.0.0

type RefundResponse struct {
	HttpMetadata common.HttpMetadata
	ActionId     string                 `json:"action_id,omitempty"`
	Reference    string                 `json:"reference,omitempty"`
	Links        map[string]common.Link `json:"_links"`
}

Response

type RiskAssessment

type RiskAssessment struct {
	Flagged bool    `json:"flagged,omitempty"`
	Score   float64 `json:"score,omitempty"`
}

type RiskRequest added in v1.0.0

type RiskRequest struct {
	Enabled         bool   `json:"enabled"`
	DeviceSessionId string `json:"device_session_id,omitempty"`
}

type SenderTypeMapping added in v1.0.0

type SenderTypeMapping struct {
	Sender string `json:"sender"`
}

type ShippingDetails added in v1.0.0

type ShippingDetails struct {
	Address        *common.Address `json:"address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
	FromAddressZip string          `json:"from_address_zip,omitempty"`
}

type ShippingInfo added in v1.0.0

type ShippingInfo struct {
	ShippingCompany       string `json:"shipping_company,omitempty"`
	ShippingMethod        string `json:"shipping_method,omitempty"`
	TrackingNumber        string `json:"tracking_number,omitempty"`
	TrackingUri           string `json:"tracking_uri,omitempty"`
	ReturnShippingCompany string `json:"return_shipping_company,omitempty"`
	ReturnTrackingNumber  string `json:"return_tracking_number,omitempty"`
	ReturnTrackingUri     string `json:"return_tracking_uri,omitempty"`
}

type ShippingPreference added in v1.0.0

type ShippingPreference string
const (
	NoShipping         ShippingPreference = "NO_SHIPPING"
	SetProvidedAddress ShippingPreference = "SET_PROVIDED_ADDRESS"
	GetFromFile        ShippingPreference = "GET_FROM_FILE"
)

type SourceType added in v1.0.0

type SourceType string
const (
	CardSource         SourceType = "card"
	IdSource           SourceType = "id"
	CustomerSource     SourceType = "customer"
	NetworkTokenSource SourceType = "network_token"
	TokenSource        SourceType = "token"
	DLocalSource       SourceType = "dLocal"
	AlipaySource       SourceType = "alipay"
	BenefitPaySource   SourceType = "benefitpay"
	BoletoSource       SourceType = "boleto"
	EpsSource          SourceType = "eps"
	GiropaySource      SourceType = "giropay"
	IdealSource        SourceType = "ideal"
	KlarnaSource       SourceType = "klarna"
	KnetSource         SourceType = "knet"
	OxxoSource         SourceType = "oxxo"
	P24Source          SourceType = "p24"
	PagoFacilSource    SourceType = "pagofacil"
	PayPalSource       SourceType = "paypal"
	PoliSource         SourceType = "poli"
	RapiPagoSource     SourceType = "rapipago"
	BancontactSource   SourceType = "bancontact"
	FawrySource        SourceType = "fawry"
	QPaySource         SourceType = "qpay"
	MultiBancoSource   SourceType = "multibanco"
	SepaSource         SourceType = "sepa"
	SofortSource       SourceType = "sofort"
	AlipayHk           SourceType = "alipay_hk"
	AlipayCn           SourceType = "alipay_cn"
	AlipayPlus         SourceType = "alipay_plus"
	Gcash              SourceType = "gcash"
	Wechatpay          SourceType = "wechatpay"
	Dana               SourceType = "dana"
	Kakaopay           SourceType = "kakaopay"
	Truemoney          SourceType = "truemoney"
	Tng                SourceType = "tng"
	Afterpay           SourceType = "afterpay"
	Benefit            SourceType = "benefit"
	Mbway              SourceType = "mbway"
	Postfinance        SourceType = "postfinance"
	Stcpay             SourceType = "stcpay"
	Alma               SourceType = "alma"

	BankAccountSource     SourceType = "bank_account"
	ProviderTokenSource   SourceType = "provider_token"
	CurrencyAccountSource SourceType = "currency_account"
	TamaraSource          SourceType = "tamara"
)

type TerminalType added in v1.0.0

type TerminalType string
const (
	App TerminalType = "APP"
	Wap TerminalType = "WAP"
	Web TerminalType = "WEB"
)

type ThreeDsData added in v1.0.0

type ThreeDsData struct {
	Downgraded             bool      `json:"downgraded,omitempty"`
	Enrolled               string    `json:"enrolled,omitempty"`
	UpgradeReason          string    `json:"upgrade_reason,omitempty"`
	SignatureValid         string    `json:"signature_valid,omitempty"`
	AuthenticationResponse string    `json:"authentication_response,omitempty"`
	Cryptogram             string    `json:"cryptogram,omitempty"`
	Xid                    string    `json:"xid,omitempty"`
	Version                string    `json:"version,omitempty"`
	Exemption              Exemption `json:"exemption,omitempty"`
	Challenged             bool      `json:"challenged,omitempty"`
}

type ThreeDsEnrollment added in v1.0.0

type ThreeDsEnrollment struct {
	Downgraded    bool                    `json:"downgraded,omitempty"`
	Enrolled      ThreeDsEnrollmentStatus `json:"enrolled,omitempty"`
	UpgradeReason string                  `json:"upgrade_reason,omitempty"`
}

type ThreeDsEnrollmentStatus added in v1.0.0

type ThreeDsEnrollmentStatus string

type ThreeDsRequest added in v1.0.0

type ThreeDsRequest struct {
	Enabled            bool                      `json:"enabled"`
	AttemptN3D         bool                      `json:"attempt_n3d"`
	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 common.ChallengeIndicator `json:"challenge_indicator,omitempty"`
	AllowUpgrade       bool                      `json:"allow_upgrade,omitempty"`
	// Not available on Previous
	Status                string                 `json:"status,omitempty"`
	AuthenticationDate    time.Time              `json:"authentication_date,omitempty"`
	AuthenticationAmount  float64                `json:"authentication_amount,omitempty"`
	FlowType              common.ThreeDsFlowType `json:"flow_type,omitempty"`
	StatusReasonCode      string                 `json:"status_reason_code,omitempty"`
	ChallengeCancelReason string                 `json:"challenge_cancel_reason,omitempty"`
	Score                 string                 `json:"score,omitempty"`
	CryptogramAlgorithm   string                 `json:"cryptogram_algorithm,omitempty"`
	AuthenticationId      string                 `json:"authentication_id,omitempty"`
}

type Ticket added in v1.0.0

type Ticket struct {
	Number             string `json:"number,omitempty"`
	IssueDate          string `json:"issue_date,omitempty"`
	IssuingCarrierCode string `json:"issuing_carrier_code,omitempty"`
	TravelAgencyName   string `json:"travel_agency_name,omitempty"`
	TravelAgencyCode   string `json:"travel_agency_code,omitempty"`
}

type UserAction added in v1.0.0

type UserAction string
const (
	PayNow   UserAction = "PAY_NOW"
	Continue UserAction = "CONTINUE"
)

type VoidRequest added in v1.0.0

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

Request

type VoidResponse added in v1.0.0

type VoidResponse struct {
	HttpMetadata common.HttpMetadata
	ActionId     string                 `json:"action_id,omitempty"`
	Reference    string                 `json:"reference,omitempty"`
	Links        map[string]common.Link `json:"_links"`
}

Response

Directories

Path Synopsis
abc
nas

Jump to

Keyboard shortcuts

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