Run your web-based POS application on a fully compliant ES6 environment based on the Chromium web browser engine with access to OS resources: JavaScript → .NET (CEFSharp & CEF) → Baxi.NET → Payment terminal
-
Install the required USB drivers for terminal communication: IngenicoUSBDrivers_2.80_setup.exe
- Enable the
Force COM Port Feature
and type in9
in the leftmost input field at the bottom of the dialog
- Enable the
-
Install the required Visual C++ runtime components (both
x86
andx64
architectures if you're running Windows 10) and WiX Toolset (http://wixtoolset.org/releases) -
Download & install the Windows 10 SDK: https://go.microsoft.com/fwlink/?LinkID=698771. Make sure
MSBuild
is included in the installation (or install it separately). Modify its path if necessary (see build.bat) -
Optional: if you're developing inside a VM, expose USB from the host machine to your VM (
Devices
->USB
->Sagem
) -
Optional: download Microsoft Expression Design 4 for converting vector art (e.g.
.ai
) into XAML- .ico generator: https://iconverticons.com/online/
-
Run
npm install
(make sure you have Node.js installed and available in your %PATH%) -
Launch the application:
- run
npm start
to start example web application - open the solution (
app/NetsExample.sln
) in Visual Studio (or alike) and run it.
- run
If Visual Studio complains about a missing BBS
(Baxi API) reference when you try building/running the application, do the following:
- Right-click on the
NetsExample
project Add
->Reference...
- Select
..Baxi.net_1.4.2.1\baxi.net45\baxi_dotnet.dll
When running in Debug
mode, a browser console will be opened alongside the application to allow interactive debugging/inspection of the application. See example/README.md for usage examples.
The solution consist of 3 projects: the application (NetsExample
) and two installer projects (setup
and bundle
). setup
packages the installer (.msi
) for the application whereas bundle
includes the application installer together with its dependencies (USB driver and .NET 4.5.2). Run npm run
for an overview of all the available scripts for building & signing the application (e.g. npm run build:release
will build a release version of the application under ./bin
)
The following build variables can be used to customize the build (see build.bat):
PRODUCTION
: flag to use for production builds, enabled by defaultLOCALHOST
: flag to indicate whether or not to open the development version of the web application (hosted locally/on development server), enabled for debug buildsDEBUG
: flag to use for debug focused logic, enabled for debug builds
The version format is major.minor.patch.revision
. The general revisioning principles are as follows:
- Breaking changes: bump
major
- New features (backwards compatible): bump
minor
(increment by the number of new features) - Bug fixes/refactoring: bump
patch
- Stylistic changes, docs, build: bump
revision
In .NET lingo, patch
is often referred to as the build
version.
If the release includes changes, start with incrementing the respective version numbers (major
/minor
/patch
/revision
):
- Assembly version: right-click on
NetsExample
project ->Properties
->Application
->Assembly Information...
->Assembly Version
andFile Version
(can be identical, see http://stackoverflow.com/a/65062 for more information) - Installer (Setup.wxs and Bundle.wxs) versions (see code comments & https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/ for reference)
- package.json version
Perform reconciliation for each Nets account configured on the terminal. If that doesn't help, try fetching the latest dataset (Fetch cards).
Confirm that the USB driver was successfully installed. Open Device Manager
and upon connecting the payment terminal via USB you should see Sagem Telium
appear under Ports (COM & LPT)
. Also, confirm that Force COM port is enabled and set to the appropriate value (COM9
)