Installation and Setup (TEST)
Requirements
Installing and running the connector requires the following:
-
Java 17 JDK
-
A Linux Environment
-
A mail server for sending alerts and notifications
-
A web server
-
A valid SSL/TLS certificate
Configuration Variables for Building the Connector
The connector uses the Mirakl SDK, so the build system will need to download it from a private Maven repository owned by Mirakl. This repository is user/password protected so the build scripts need these two environment variables:
PAYPAL_MIRAKL_SDK_USER PAYPAL_MIRAKL_SDK_PASSWORD
Folders
The connector stores information in the following folders:
-
./data
: Contains the connector’s database. Can be customized using the environment variablePAYPAL_HYPERWALLET_DATA_DIR
. -
./financial-report
: Contains the financial reports generated by the connector. Can be customized using the environment variablePAYPAL_HYPERWALLET_FINANCIAL_REPORTS_OUTPUT_DIR
.
Build and run from source (Quickstart)
This is the easy and most straightforward way of running the connector. You simply download the code, build it and run it from the same directory.
Building the connector
-
Clone the GitHub repository of the project:
$ git clone https://github.com/paypal/mirakl-hyperwallet-connector.git
-
Set up build required environment variables
-
Execute build script:
$ ./gradlew clean build
After these steps the connector is ready to run.
Running the connector
-
Set up the required configuration environment variables
-
Run the connector
$ ./gradlew app:bootRun
Checking if the connector is ready
-
Access
http://<host>:8080/connector
Run the connector with docker
With this setup workflow you will generate a docker image that can be used to run the connector and that is easily exportable to other environments.
Building the connector
-
Clone the GitHub repository of the project:
$ git clone https://github.com/paypal/mirakl-hyperwallet-connector.git
-
Set up build required environment variables
-
Execute build script:
$ ./gradlew clean build
Running the docker container
-
Create an
.env
file with the environment variables. You can use the provided.env.sample
as a reference -
Start the connector with docker using this command (change
X.Y.Z`
with the version of the connector, e.g.5.0.0
)$ docker run --env-file .env -p 8080:8080 hyperwallet-mirakl-connector:X.Y.Z
If needed, you can also map the volumes for the folders described at the begining of the page and for the encryption keys. |
Running the docker container with docker compose
-
Create a docker compose file
$ ./gradlew buildDockerCompose -Pprod=true
You can also generate a docker compose file for development or testing purposes by omitting -Pprod=true . This docker compose file will also launch additional dependencies like mail server so you don’t need to setup one.
|
-
Create an
.env
file with the environment variables. You can use the provided.env.sample
as a reference -
Start the connector with docker compose using this command
$ docker-compose up
If needed, you can also edit the generated docker-compose file to change the volume mappings. |
Building and running a binary
With this setup workflow you will build an executable JAR that you can move to the target machine where you want to execute the connector. This allows you to build only one time and reuse the executable JAR for multiple environments (like your pre-production and production environment).
Building the connector
-
Clone the GitHub repository of the project:
$ git clone https://github.com/paypal/mirakl-hyperwallet-connector.git
-
Set up required environment variables for the build process
-
Execute build script:
$ ./gradlew clean build
After these steps the connector is ready to run.