Please refer to the official documentation to get all details about payment integration and installation steps.
From your project's root run
yarn install
Running build
script from project's root will build code for all the packages
yarn build:prod
To build packages individually make sure you switch to respective package directory as shown below
cd packages/<package_name>
yarn build:prod
yarn start
To quickly start all servers from project's root directory run
- Start OCC Mock Server:
yarn start:mock-server
- Start Server Side extension:
yarn start:server
If all servers above have successfully started you should be able to test payment integrations
Before starting local dev servers make sure you provide gateway settings in packages/payment-gateway/settings.json
. More details about available settings can be found in the Payment Gateway Package section
packages/occ-mock-server
package acts as REST API mocks in order to abstract away dependencies on certain OCC endpoints. Endpoints are defined in the following file packages/occ-mock-server/src/routes/index.ts
.
The package is used only for local development and is not deployed to OCC
To start server run the following:
cd packages/occ-mock-server
yarn start:watch
By default server will listen on port 5000 (HTTP) and 5001 (HTTPS)
You can start SSE locally by running
cd packages/server-extension
yarn start:watch
Server startup script and setup is located at packages/server-extension/src/server.ts
, by default server will listen on port 3000 (HTTP) and 3001 (HTTPS).
For local development packages/server-extension/config/app.local.json
configuration file is loaded.
server-extension
consumes endpoints from occ-mock-server
so make sure both are running locally
Solution include CLI tool to deploy and manage both server side extensions and widgets.
Run yarn occ
from project's root to see all available commands. You will need to provide credentials to be able to execute commands. Credentials in some cases are username and password for OCC Admin, in other cases Application Key should be provided.