This repository provides a connect for integration to Voucherify gift card service.
- Typescript language supported.
- Uses Fastify as web server framework.
- Uses commercetools SDK for the commercetools-specific communication.
- Uses connect payment SDK to manage request context, sessions and JWT authentication.
- Includes local development utilities in npm commands to build, start, test, lint & prettify code.
The voucherify-integration connector contains two modules :
- Enabler: Acts as a wrapper implementation in which frontend components are embedded. It gives control to checkout product on when and how to load the connector frontend based on business configuration. In cases connector is used directly and not through Checkout product, the connector library can be loaded directly on frontend than the PSP one.
- Processor : Acts as backend services which is a middleware to integrate with Voucherify. It facilitates communication between Voucherify and checkout, while also updating payment entity in composable commerce.
connect-payment-sdk
will be offered to be used in connector to manage request context, sessions and other tools necessary to transact.
In order to get started developing this connector certain configuration are necessary, most of which involve updating environment variables in both services (enabler, processor).
Navigate to each service directory and duplicate the .env.template file, renaming the copy to .env. Populate the newly created .env file with the appropriate values.
cp .env.template .env
With the help of docker compose, you are able to spin up all necessary components required for developing the connector by running the following command from the root directory;
docker compose up
This command would start 3 required services, necessary for development
- JWT Server
- Enabler
- Processor