Tool Install and Overview
Payter will provide the CLI tool as a compressed package to licensed partners only.
Tool Description
The tool is a Java application which runs on a local machine and accepts commands from a Command or Terminal Prompt. As a Java application run from a command line, it is compatible with Windows, Mac and Linux systems.
The tool outputs templates to Hex and JSON files. The Hex output is used during the Approval stage, and is what is entered into MyPayter to configure other terminals.
Requirements
- Java 17 or higher is required
- Online connectivity is needed
- The user executing the Command or Terminal will need Read/Write access to the program location
Getting Started
Running the Tool for the First Time
- Download and unpack the tool. Save it to an accessible and unrestricted location e.g. A dedicated folder in Documents
- Open a Command or Terminal Window, and navigate to the same folder you have saved the tool in.
- Run the tool with:
java -jar apollo-template-cli-1.0.5.jar
- When successfully running, you should see the prompt:
template-cli:>
Connecting the Tool and your Staging Terminal
You will need a Staging Terminal in Cloud (CPS) mode to use the tool. As part of setting this up, you will have been given access to securely generate your own CPS API Key. This API Key is a core requirement of this tool
{apikey}- The alphanumeric GUID that is your CPS API Key, without any other data or text{serial}- The serial number of your Staging terminal e.g. APO20201212345
setup-cps-connection --apiKey {apikey} --serial {serial} --env staging
You can only use this tool for terminals in the Staging environment.
Create your First Screen
In the Apollo template tool, screens are referred to as templates, while the individual components within a screen are called elements. Templates define the overall structure of the screen, and elements represent the interactive or visual components placed within it.
Each template is a separate entity, so if you are planning on using multiple customized screens, you should give the templates unique names.
To create a new template and display it on the terminal, follow these steps using the command-line interface:
template-cli:> add-template my-first-screen
my-first-screen has been added
template-cli:> select-template my-first-screen
my-first-screen selected
Template Management
Saving Templates
The screens are saved during the tool run time, so to save the screen for a next session you can save the screen on the local computer and load them when needed. This can be done using the following commands:
template-cli:> save-template ./
0A0F6D792D66697273742D73637265656E
Saving the template will generate a hex string with the template layout and a file with a representation of the layout in JSON form.
Loading Templates
Loading the template can be done by entering the hex code or path to the file.
template-cli:> load-template --templateHex 0A0F6D792D66697273742D73637265656E
my-first-screen loaded
or
template-cli:> load-template --templateJSON ./my-first-screen.json
my-first-screen loaded
Direct Editing of JSON files are covered in more detail in the next section.