Skip to content

Adyen/adyen-salesforce-commerce-cloud

Repository files navigation

Salesforce Commerce Cloud Adyen Cartridge

Adyen provides a LINK cartridge to integrate with Salesforce Commerce Cloud (SFCC). This cartridge enables an SFCC storefront to use the Adyen payment service.

Compatibility with SFCC architectures

Integration

This cartridge allows you to integrate with Adyen without the need for any development work from your end. Online payments are processed on the back-end using the Checkout API, and on the client side, Adyen’s Web Components are used to render payment methods. Point of Sale (POS) payments are processed using a cloud-based Terminal API.

This cartridge contains 2 folders, /src and /cartridges. The /src folder is the origin, while the /cartridges folder contains the transpiled code.

Transpilation

Some files in the /src directory contain modern JavaScript (ES6, MobX) that Salesforce Commerce Cloud does not natively support.

To make the code compatible, we downgrade the ES6 to ES5 by transpiling, compiling, and uploading the auto-generated code to the /cartridges directory, see more in our Docs.

How to customize the cartridge

  • (Before v 23.2.1) (Recommended) If you want to modify the cartridge code and you write in JavaScript ES6, you may need to use the /src folder. Performing a transpilation on the /src folder ensures that you can later move your customizations to a new cartridge version during an upgrade. This is achieved by comparing the code in the /src folders between different releases, see GitHub instructions.
  • (Before v 23.2.1) You can add changes directly to /cartridges without transpiling if you use JavaScript ES5. These customizations will not be transpiled. This may result in a more complex upgrading process.
  • (After v 23.2.1) (Recommended) If you are able to modularize your customizations, create a new cartridge in your /cartridges directory and name it, for example, int_custom_cartridge, see more in our Docs. These customizations will not be transpiled and will be preserved when you upgrade to a new cartridge version.

Requirements

It is required to have an Adyen account to use the cartridge. You can do this here.

Installation, Usage and Configuration

Installation, Usage and Configuration is explained in Adyen's online documentation.

Apple Pay configuration for both Adyen certificate and Apple certificate using Salesforce cartridge can be found here.

Testing

End-to-End tests can be found in the adyen-salesforce-commerce-cloud/tests/e2e directory. They are run automatically via Github Actions using the E2E.yml workflow. To run the tests locally use the following command:

`npm run test:e2e`

Note: Please make sure to fill in the environment variables in the fixtures directory before running the tests locally.

As for Unit tests, they are currently only available for SFRA. Test files can be found next to the files they are testing. Mocks are kept in the jest directory. To run SFRA unit tests locally use the following command:

`npm run test`

Support & Maintenance

We provide specialized cartridge support for major versions of the plugin following the SFCC B2C Support policy, along with permanent Adyen support.

When a major cartridge version is no longer under cartridge support, it will be treated as a custom merchant integration. From version 23 onward, we do not provide any level of support for SiteGenesis integrations.

Migration and Upgrade Guide

SFCC Cartridge Support Schedule for SFRA and SiteGenesis

Contributing

We strongly encourage you to join us in contributing to this repository so everyone can benefit from:

  • New features and functionality
  • Resolved bug fixes and issues
  • Any general improvements

Read our contribution guidelines to find out how.

Platform

Read more information about the Adyen platform.

Licence

MIT license see LICENSE.