nuvei-commercetools provides an Nuvei Simply Connect based integration between the commercetools and Nuvei PSP.
This repository has 2 independent modules that to interact with commercetools and Nuvei. For full integration, it's essential to run both modules concurrently.
-
The front end lists all available payment options.
-
The user selects the Nuvei payment option which will create a payment with
paymentInterface = 'nuvei'on purchase completion. -
With the help of the commercetools HTTP API Extensions provided data is sent to the Extension API Module.
-
The Extension API Module processes the provided payload passed by the front end and exchanges it with the Nuvei API for a session token and provides synchronous response back to the front end / commercetools caller. After receiving the response and using the session token the FE initializes the Nuvei Simply Connect widget which presents the required payment methods.
Furthermore, the DMN module will receive from Nuvei asynchronous notifications for every payment status update. To seamlessly integrate your front end with both the Extension API and DMN modules, please refer to the comprehensive guides provided below.
The extension api module serves as a publicly accessible intermediary service facilitating communication between the commercetools platform and Nuvei. Upon configuring commercetools HTTP API Extensions to invoke the Nuvei extension api module, the commercetools platform will remotely trigger the Nuvei extension api module for each payment creation.
- Refer to the Integration Guide for instructions on integrating your shop with this module.
- Refer to the How to run the extension module.
The Direct Merchant Notification Module acts as a vital interface for handling asynchronous notifications from Nuvei. These notifications relay important updates regarding payment status updates, including authorizations, charges, or refunds. Upon receipt of a notification from Nuvei, the module diligently interacts with the commercetools platform, locating the relevant payment transaction and adjusting it accordingly to maintain coherence with Nuvei's updates.
- Refer to the Integration Guide for information how to integrate with DMN module.
- Refer to the How to run the dmn module.
- Security: The extension-api module is secured with basic authentication.
- Logging: The modules are integrated with the Winston logger for logging. The logs are stored in the
logsdirectory. You can add your own logger by extending the LoggerInterface interface. - Unit tests: The extension-api and dmn-api modules are integrated with Vitest for unit testing.
- Code standards: The modules are integrated with ESLint via XO.js for code standardization checks via . The ESLint configuration is available in the root of the repository.
- Code formatting: The modules are integrated with Prettier for code formatting. The Prettier configuration is available in the root of the repository.
- Static Code Analysis: The modules are integrated with SonarCloud for static code analysis. The SonarCloud configuration is available in the root of the repository.
- Security Scanning: The modules are integrated with Bearer for security scanning.
- This module does not aim to modify or take an opinion on the payment flow of your business. It is designed to facilitate the integration between the commercetools platform and the Nuvei PSP. This is why this module is designed to be as flexible as possible and will not make modifications to your Order's status, payment status, or any other business logic.
- The deployment of the modules will depend on your organization's security and compliance policies. The provided Helm charts, Dockerfile, docker-compose.yaml should not be considered production-ready and should be reviewed by your organization's DevOps team before deployment.
