Documentation ¶
Index ¶
Constants ¶
View Source
const HostedPaymentsPath = "hosted-payments"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(configuration *configuration.Configuration, apiClient client.HttpClient) *Client
func (*Client) CreateHostedPaymentsPageSession ¶
func (c *Client) CreateHostedPaymentsPageSession(request HostedPaymentRequest) (*HostedPaymentResponse, error)
func (*Client) GetHostedPaymentsPageDetails ¶
func (c *Client) GetHostedPaymentsPageDetails(hostedPaymentId string) (*HostedPaymentDetails, error)
type HostedPaymentDetails ¶
type HostedPaymentDetails struct { HttpMetadata common.HttpMetadata Id string `json:"id,omitempty"` Status PaymentStatus `json:"status,omitempty"` PaymentId string `json:"payment_id,omitempty"` Amount int `json:"amount,omitempty"` Currency common.Currency `json:"currency,omitempty"` Reference string `json:"reference,omitempty"` Description string `json:"description,omitempty"` Customer *common.CustomerRequest `json:"customer,omitempty"` Billing *payments.BillingInformation `json:"billing,omitempty"` Products []payments.Product `json:"products,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` SuccessUrl string `json:"success_url,omitempty"` CancelUrl string `json:"cancel_url,omitempty"` FailureUrl string `json:"failure_url,omitempty"` Links map[string]common.Link `json:"_links"` //Not available on previous AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"` }
type HostedPaymentRequest ¶
type HostedPaymentRequest struct { Amount int `json:"amount,omitempty"` Currency common.Currency `json:"currency,omitempty"` PaymentType payments.PaymentType `json:"payment_type,omitempty,omitempty"` PaymentIp string `json:"payment_ip,omitempty"` BillingDescriptor *payments.BillingDescriptor `json:"billing_descriptor,omitempty"` Reference string `json:"reference,omitempty"` Description string `json:"description,omitempty"` Customer *common.CustomerRequest `json:"customer,omitempty"` Shipping *payments.ShippingDetails `json:"shipping,omitempty"` Billing *payments.BillingInformation `json:"billing,omitempty"` Recipient *payments.PaymentRecipient `json:"recipient,omitempty"` Processing *payments.ProcessingSettings `json:"processing,omitempty"` AllowPaymentMethods []payments.SourceType `json:"allow_payment_methods,omitempty"` Products []payments.Product `json:"products,omitempty"` Risk *payments.RiskRequest `json:"risk,omitempty"` SuccessUrl string `json:"success_url,omitempty"` CancelUrl string `json:"cancel_url,omitempty"` FailureUrl string `json:"failure_url,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Locale string `json:"locale,omitempty"` ThreeDs *payments.ThreeDsRequest `json:"3ds,omitempty"` Capture bool `json:"capture,omitempty"` CaptureOn *time.Time `json:"capture_on,omitempty"` //Not available on previous ProcessingChannelId string `json:"processing_channel_id,omitempty"` AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"` }
type HostedPaymentResponse ¶
type PaymentStatus ¶
type PaymentStatus string
const ( PaymentPending PaymentStatus = "Payment Pending" PaymentReceived PaymentStatus = "Payment Received" Expired PaymentStatus = "Expired" )
Click to show internal directories.
Click to hide internal directories.