payments

package
v0.0.0-...-1f8cd32 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: BSD-3-Clause, MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a payments client. Thread-safe.

func NewClient

func NewClient(parent *apiresource.APIResource, pathContext map[string]string) *Client

NewClient constructs a Payments Client

parent is the *apiresource.APIResource on top of which we want to build the new Payments Client

func (*Client) Approve

func (c *Client) Approve(paymentID string, body payment.ApproveRequest, context communication.CallContext) (payment.ApprovalResponse, error)

Approve represents the resource /{merchantId}/payments/{paymentId}/approve - Approve payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/approve.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Cancel

func (c *Client) Cancel(paymentID string, context communication.CallContext) (payment.CancelResponse, error)

Cancel represents the resource /{merchantId}/payments/{paymentId}/cancel - Cancel payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/cancel.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Cancelapproval

func (c *Client) Cancelapproval(paymentID string, context communication.CallContext) (payment.CancelApprovalPaymentResponse, error)

Cancelapproval represents the resource /{merchantId}/payments/{paymentId}/cancelapproval - Undo capture payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/cancelapproval.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Capture

func (c *Client) Capture(paymentID string, body payment.CapturePaymentRequest, context communication.CallContext) (capture.Response, error)

Capture represents the resource /{merchantId}/payments/{paymentId}/capture - Capture payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/capture.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Captures

func (c *Client) Captures(paymentID string, context communication.CallContext) (capture.CapturesResponse, error)

Captures represents the resource /{merchantId}/payments/{paymentId}/captures - Get captures of payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/captures.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Complete

Complete represents the resource /{merchantId}/payments/{paymentId}/complete - Complete payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/complete.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Create

Create represents the resource /{merchantId}/payments - Create payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/create.html

Can return any of the following errors: * DeclinedPaymentError if the Ingenico ePayments platform declined / rejected the payment. The payment result will be available from the exception. * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Devicefingerprint

func (c *Client) Devicefingerprint(paymentID string, context communication.CallContext) (payment.DeviceFingerprintDetails, error)

Devicefingerprint represents the resource /{merchantId}/payments/{paymentId}/devicefingerprint - Get Device Fingerprint details Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/devicefingerprint.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Dispute

func (c *Client) Dispute(paymentID string, body dispute.CreateRequest, context communication.CallContext) (dispute.Response, error)

Dispute represents the resource /{merchantId}/payments/{paymentId}/dispute - Create dispute Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/dispute.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Disputes

func (c *Client) Disputes(paymentID string, context communication.CallContext) (dispute.DisputesResponse, error)

Disputes represents the resource /{merchantId}/payments/{paymentId}/disputes - Get disputes Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/disputes.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Find

Find represents the resource /{merchantId}/payments - Find payments Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/find.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Get

func (c *Client) Get(paymentID string, context communication.CallContext) (payment.Response, error)

Get represents the resource /{merchantId}/payments/{paymentId} - Get payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/get.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Processchallenged

func (c *Client) Processchallenged(paymentID string, context communication.CallContext) (payment.Response, error)

Processchallenged represents the resource /{merchantId}/payments/{paymentId}/processchallenged - Approves challenged payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/processchallenged.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Refund

func (c *Client) Refund(paymentID string, body refund.Request, context communication.CallContext) (refund.Response, error)

Refund represents the resource /{merchantId}/payments/{paymentId}/refund - Create refund Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/refund.html

Can return any of the following errors: * DeclinedRefundError if the Ingenico ePayments platform declined / rejected the refund. The refund result will be available from the exception. * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Refunds

func (c *Client) Refunds(paymentID string, context communication.CallContext) (refund.RefundsResponse, error)

Refunds represents the resource /{merchantId}/payments/{paymentId}/refunds - Get refunds of payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/refunds.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) ThirdPartyStatus

func (c *Client) ThirdPartyStatus(paymentID string, context communication.CallContext) (payment.ThirdPartyStatusResponse, error)

ThirdPartyStatus represents the resource /{merchantId}/payments/{paymentId}/thirdpartystatus - Third party status poll Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/thirdPartyStatus.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

func (*Client) Tokenize

func (c *Client) Tokenize(paymentID string, body payment.TokenizeRequest, context communication.CallContext) (token.CreateResponse, error)

Tokenize represents the resource /{merchantId}/payments/{paymentId}/tokenize - Create a token from payment Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/tokenize.html

Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error

type FindParams

type FindParams struct {
	HostedCheckoutID  *string
	MerchantReference *string
	MerchantOrderID   *int64
	Offset            *int32
	Limit             *int32
}

FindParams represents query parameters for Find payments Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/find.html

func NewFindParams

func NewFindParams() *FindParams

NewFindParams constructs an instance of FindParams

func (*FindParams) ToRequestParameters

func (params *FindParams) ToRequestParameters() communicator.RequestParams

ToRequestParameters converts the query to communicator.RequestParams

Jump to

Keyboard shortcuts

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