Documentation ¶
Index ¶
Constants ¶
const ( EndpointTest = "https://pal-test.adyen.com" EndpointLive = "https://pal-live.adyen.com" EndpointLiveSuffix = "-pal-live.adyenpayments.com" MarketpayEndpointTest = "https://cal-test.adyen.com/cal/services" MarketpayEndpointLive = "https://cal-live.adyen.com/cal/services" MarketpayAccountAPIVersion = "v5" MarketpayFundAPIVersion = "v5" MarketpayNotificationAPIVersion = "v5" APIVersion = "v52" RecurringAPIVersion = "v49" CheckoutEndpointTest = "https://checkout-test.adyen.com/checkout" CheckoutEndpointLiveSuffix = "-checkout-live.adyenpayments.com/checkout" CheckoutAPIVersion = "v52" BinLookupPalSuffix = "/pal/servlet/BinLookup/" BinLookupAPIVersion = "v50" CheckoutUtilityAPIVersion = "v1" TerminalAPIEndpointTest = "https://terminal-api-test.adyen.com" TerminalAPIEndpointLive = "https://terminal-api-live.adyen.com" EndpointProtocol = "https://" )
Constants used for the client API
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { // API Services Checkout *checkout.Checkout CheckoutUtility *checkoututility.CheckoutUtility Payments *payments.Payments Payouts *payouts.Payouts Recurring *recurring.Recurring BinLookup *binlookup.BinLookup Notification *notification.NotificationService // contains filtered or unexported fields }
APIClient manages communication with the Adyen Checkout API API v51 In most cases there should be only one, shared, APIClient.
func NewClient ¶
NewClient creates a new API client. Requires Config object.
@param config A reference to common.Config object
create a new API client based on provided api key & url prefix for LIVE environment
client := NewClient(&common.Config{ ApiKey: "apiKey", Environment: common.LiveEnv, LiveEndpointURLPrefix: "liveEndpointURLPrefix", }) ApiKey Defines the api key that can be retrieved by back office Environment This defines the payment environment live or test LiveEndpointURLPrefix Provide the unique live url prefix from the "API URLs and Response" menu in the Adyen Customer Area
create a new API client based on provided api key for TEST environment
client := NewClient(&common.Config{ ApiKey: "apiKey", Environment: common.TestEnv, }) ApiKey Defines the api key that can be retrieved by back office Environment This defines the payment environment live or test
creates a new API client based on provided credentials & url prefix for LIVE environment
client := NewClient(&common.Config{ Username: "username", Password: "password", ApplicationName: "applicationName", Environment: common.LiveEnv, LiveEndpointURLPrefix: "liveEndpointURLPrefix", }) Username Your merchant account Username Password Your merchant accont Password Environment This defines the payment environment live or test ApplicationName Application name to be used in user agent LiveEndpointUrlPrefix Provide the unique live url prefix from the "API URLs and Response" menu in the Adyen Customer Area
creates a new API client based on provided credentials for TEST environment
client := NewClient(&common.Config{ Username: "username", Password: "password", ApplicationName: "applicationName", Environment: common.TestEnv, }) Username Your merchant account Username Password Your merchant accont Password Environment This defines the payment environment live or test ApplicationName Application name to be used in user agent
optionally a custom http.Client can be passed via the Config allow for advanced features such as caching.
func (*APIClient) GetConfig ¶
GetConfig Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (*APIClient) SetEnvironment ¶
func (c *APIClient) SetEnvironment(env common.Environment, liveEndpointURLPrefix string)
SetEnvironment This defines the payment environment for live or test
- @param environment This defines the payment environment live or test
- @param liveEndpointUrlPrefix Provide the unique live url prefix from the "API URLs and Response" menu in the Adyen Customer Area