SPI  1.2111.4
Secured Payment Interface
SPI Documentation

Welcome to SPI documentation.

Hebrew speakers may read the Hebrew Introduction .

Click to see manual to SPIShell .

Java Documentations

Java developers for PC (SPI4J) and for Android (SPIdroid) may use the following Javadoc

Features

Feature SPI SHVA
Supported Platforms:
· Windows 7/8/10 ✔ ✔
· Windows XP ✔
· Linux ✔
· Android ✔
· iOS / OSX ✔
API Bindings:
· .NET ✔ ✔
· C/C++ ✔
· Python ✔
· Java ✔
· JavaScript (NodeJS) ✔
· Cordova plugin ✔
Command line interface (SPIShell) ✔
Asynchronous API ✔
Multi-Vendor PINPad ✔ ✔
Offline Transactions ✔ ✔
Multiple PINPads support (P@TT, Fuel, Parking) ✔
Single PINPad with multiple POS ✔
ACID Database ✔
Server / Remote installation (Single instance to support multiple end points) ✔
Library ✔ ✔
Run as a Service / Daemon ✔
Remote + Local transaction mix ✔
Loyalty card support ✔ ✔
Customer display management ✔
PINPad Ethernet support ✔
PINPad Serial/USB support ✔ ✔
PINPad WiFi Support ✔
Gateway:
· SHVA (ABS) ✔ ✔
· Pelecard ✔
· Creditguard ✔
J5 Support ✔ ✔
All SHVA transactions types ✔ ✔
Card Not Present (Phone) ✔ ✔
Simple API (no need to understand EMV/Payment) ✔
Open API for Easy ERP integration ✔
Same schema for payment terminals (unified database) ✔
Support for full Payment Terminal (PCI) ✔
Debit transactions ✔
QR / Mobile payments ✔
Modular designed to support future payment services with the same API ✔

Getting Started

First, we'll need to create SPI environment, this code should be executed once when ECR in loading.

Modularity::SPI::SPI PaymentInterface;
Modularity::SPI::Service *AshraitServiceHandle;
string Version;
PaymentInterface.GetSPIVersion(Version);
if ( (AshraitServiceHandle = PaymentInterface.GetServiceHandler("AshraitEMV")) == NULL)
AshraitServiceHandle = PaymentInterface.AddService("AshraitEMV", Modularity::SPI::Config() )
if (AshraitServiceHandle == NULL)
return -1;
AshraitServiceHandle->Init("Machine_Serial_Number");

In order to get all the parameters from the service processor we need to make establishment

if (AshraitServiceHandle->GetServiceStatus() == SPI_STATUS::SPI_NOT_ESTABLISHED)
AshraitServiceHandle->DoEstablishment("0880700");

Now that we are ready to use the service we can do as many transactions as we want:

if (AshraitServiceHandle != NULL && AshraitServiceHandle->GetServiceStatus() == SPI_READY ) {
Modularity::SPI::AshraitEMVTransaction TranObj(12000,"your_string", Curr_Shekel);
TranObj.SetPinpadId(1);
AshraitServiceHandle.DoTransaction((Transaction*)&TranObj);
if (TranObj.GetTransactionResultCode() == 0) {
std::vector<ReceiptLine> MerchentReceipt = TranObj.GetMerchentRecipt();
}
}

After we did all those transactions we can batch them to Service processor at the end of day:

std::string ReportResult;
AshraitServiceHandle->EndOfDay(&ReportObject);
if (ReportObject.GetPrintableString(ReportResult) == SPI_SUCESS)
std::cout << ReportResult;

Contact Us

Maintainer: Ido Algom
Email: ido@m.nosp@m.dlrt.nosp@m.y.com