Integrating Adyen using an AWS lambda
Deprecated
This feature is now deprecated since February 1, 2021.
As of February 2021, all new integrations must be configured in the platform as the AWS lambda has been deprecated and NewStore will stop supporting it soon.
Setting up the adapter
The template.yaml contains default values that you can change to configure the adapter for the retailer:
bucket_timeout
: Timeout value for AWS S3 operations in seconds.endpoint
: Adyen's service base URL.event_code_mapping
: Events received by Adyen, corresponding to webhooks in NewStore Omnichannel Cloud.event_code_forwarding
: Decides which Adyen specific event codes (ex: AUTHORISATION, CAPTURE) are formatted to NewStore async.immediate_capture
: Set to the same value as the setting in the retailer's merchant account in Adyen. If set totrue
, authorization and capture transactions are sent back to NewStore Omnichannel Cloud when the Create financial instrument webhook is called. Sends only the authorization transaction if this isfalse
.merchant_account
: The Adyen merchant account for the retailer. This is a fallback mechanism as the merchant account is sent as metadata in the hooks.newstore_api_endpoint
: The NewStore host (ex: retailer.v.newstore.net).newstore_api_password
: The password of the NewStore API user.newstore_api_user
: The user eligible to access the NewStore API.newstore_requests_folder
: The folder in the S3 bucket to save hook requests from NewStorenotification_folder
: The folder in the S3 bucket to save notifications from Adyen.notification_password
: The notification password set for the retailer in Adyen. This is used to build the authorization header from async messages (credentials).notification_user
: The notification username set for the retailer in Adyen.process_request_sync_mapping
: The mapping of Adyen's async methods that are processed synchronously.provider_name
: The provider name set for theexternal_providers
key. The current value can be verified with the Payment configuration API.reason_code_mapping
: The NewStore Omnichannel Cloud transaction reason corresponding to the webhooks in NewStore Omnichannel Cloud.resource_mapping
: Resources in Adyen corresponding to the webhooks in NewStore Omnichannel Cloud.s3_bucket
: NewStore's Amazon S3 bucket for the retailer.timeout
: The request timeout for the http client in milliseconds.timeout_offset
: The offset in milliseconds which will be deducted from the remaining run time before the lambda timeout to construct a response to the platform.ws_password
: The web service password for the retailer in Adyen. This is used to build the authorization header (credentials).ws_user
: The web service username for the retailer in Adyen. This is used to build the authorization header (credentials).
Deploying the adapter
- Create an AWS session for the deployment profile (develop, sandbox, staging etc.)
- Set the following environment variables to deploy the AWS Lambda:
Variable | Description |
---|---|
TENANT_NAME_IN_PREFIX | If set, creates a stack like tenant-adyen_dev . Otherwise, creates adyen_dev. |
NEWSTORE_TENANT | The retailer. |
NEWSTORE_STAGE | The deployment environment. |
MERCHANT_ACCOUNT | The retailer's merchant account in Adyen. |
WS_USER | The retailer's web_service_user_name set in Adyen. |
WS_PASSWORD | The retailer's web_service_password set in Adyen. |
NOTIFICATION_USER | The retailer's notification_user_name , set in Adyen. |
NOTIFICATION_PASSWORD | The retailer's notification_password set in Adyen. |
This creates a stack and function with the tenant name in prefix and
stage as suffix. For example, retailer-adyen_dev
.
- To deploy or update the settings, use
make create-cf-stack
. - To update only the function code, use
make update-cf-function-code
. - To delete the stack,
make delete-cf-stack
.
Ensure that:
- The published API gateway endpoint is accurate, since this configures Adyen on NewStore Omnichannel Cloud.
- The Standard Notifications URL in Adyen is accurate.