Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Payment Card Simulation Application

Prerequisites

  • NonStop C Compiler.
  • An installed instance of LightWave Server version 1.1.8 or greater.

To enable SMS Notifications

The Twilio SMS API is used to send SMS notifications. SMS notifications require:

  • An installed instance of LightWave Client version 1.2.8 or greater.
  • A Twilio account enabled for the SMS API. It's possible to use a trial account and send SMS messages.

To enable email Notifications

Twilio Twilio SendGrid email API is used to send email notifications. Email notifications require:

  • An installed instance of LightWave Client version 1.2.8 or greater.
  • A Twilio SendGrid account enabled for the email API. It's possible to use a trial account and send email notifications.

Configuration

The following values must be configured in the SETENV TACL macro after installation of the sample:

  • pathmon-name - The process name of the Pathmon. The default is $NSIS.

  • lws-isv - The installation subvolume of an installed and running LightWave Server instance. The default is the current subvolume.

  • lwc-isv - The installation subvolume of an installed LightWave Client instance. Required only if SMS notification is enabled. Note that the CONSOLE process does not need to be running. The default is the current subvolume.

  • enable-sms - Set to 1 to enable SMS. The default is 0, or disabled.

  • twilio-messaging-base-url - The base URL for the Twilio messaging API.

  • twilio-account-sid - The SID of your Twilio account.

  • twilio-phone-no - The sending phone number of your Twilio account.

  • enable-email - Set to 1 to enable email. The default is 0, or disabled.

  • sg-base-url - The base URL for the SendGrid email API.

  • sg-from-email - The email sender (from) email address.

  • sg-transaction-template-id - The SendGrid email template ID for payment notifications.

  • sg-card-status-template-id - The SendGrid email template ID for card status notifications.

The LightWave Server API is configured to use the value of the =NSIS-PATHMON DEFINE as the Pathmon process name. This DEFINE is set by the SETENV macro. The LightWave Server instance must be restarted with this DEFINE set in order to for the DEFINE to recognized.

SMS Configuration

If using SMS notifications, the SETENV file must be updated with your Twilio SMS account information, and the TWAUTH file must be updated with the SMS API credentials. These credentials are supplied as the Twilio <Account SID>:<Auth Token> encoded as a base64 string. For more information see the TWAUTH template file and Request Authentication and Signing in the LightWave Client documentation.

Email Configuration

If using email notifications, the SETENV file must be updated with your Twilio SendGrid account information, and the SGAUTH file must be updated with the SendGrid email API key. For more information see the SGAUTH template file and Request Authentication and Signing in the LightWave Client documentation.

Email templates have been included with the source. You may install these templates or create your own. The provided templates are:

Installation

The application is built from source. The source files are present in the repository for convenient viewing. In addition, a PAK archive containing all of the source files is available for transfer to your NonStop system. Filename extensions are handled according to the following rules:

Repository File NonStop File
name.bin name
name.c namec
name.h nameh
name.html name
name.json name
name.tacl name
name.txt name

Transfer the PAK archive to your NonStop System

Download nsispak.bin from this repository to your local system, then upload to your NonStop server using binary transfer mode.

Note: to download the PAK file, click nsispak.bin in the file list to display the file details, then click the Download row file button.

Logon to TACL on your NonStop system to peform the installation and build steps.

Unpak the PAK archive

TACL > UNPAK NSISPAK ($*.*.*), VOL $vol.subvol, LISTALL, MYID

Customize and run SETENV

After running SETENV, restart LightWave Server so that it will recognize the =NSIS-PATHMON define.

TACL> T/EDIT SETENV
TACL> RUN SETENV

If using SMS notifications, customize the TWAUTH file.

TACL> T/EDIT TWAUTH

If using email notications, customize the SGAUTH file.

TACL> T/EDIT SGAUTH

Build the application DDL dictionary and servers

TACL > RUN BUILD

Install the LightWave Server service definitions

TACL > RUN INSTSVC

Optionally install the sample data

After installation, the application files are empty. This process will install sample data with one sample user and card.

TACL > RUN UNPAKDAT

Start the Pathway

TACL > RUN STARTPW