![]() |
SPI
1.1.30
Secured Payment Interface
|
SPIShell is a command line interface for SPI library. SPIShell is cross-platform and supplied with every package of SPI.
Run the supplied installer from Modularity FTP. In Microsoft Windows based systems SPIShell is in the PATH and can access from anywhere. In Linux based systems SPIShell is located in /opt/Modularity/SPI/bin #Usage: SPIShell.exe operation [args]
--option arg One of the following options: establishment,
addpinpad, transaction, endofday
--arguments arg arguments arguments: these are the arguments that
are entered without an option
--vuid arg vendor unique identifeirt string to use in
transaction or cancel
--help Print help
--version Print SPI and AshraitEMV service versions
--status Print AshraitEMV status
--retailerid Print retailer id
--erase Reset service
--pinpad arg Pinpad identification for transaction and cncel
transaction
--proc-ip arg Processor IP Address, default is prod enviorment
--service-port arg Serial port (e.g. COM10 or full path in posix
/dev/tty2
--config-file arg Path to configuration file continging general
settings
establishment options:
--retailer arg Processor retailer number (mandatory)
addpinpad options:
--id arg Pinpad identification (mandatory)
--ip-addr arg IP Address
--com-port arg Serial Port (e.g. COM2 or full path in posix
/dev/ttyPos0
endofday options:
--report-file arg Path to report if process exited with code 0
--report-format arg Z Report format ,argument is not mandatory. see
doc [narrow|medium|wide|xml]
transaction options:
--amount arg Transaction amount (mandatory)
--refund Is refund transaction
--cnp-type arg CNP type - must be = phone | signtaure
--pan arg Credit card PAN wehn doing CNP transaction
--cvv arg Credit card CVV wehn doing CNP transaction
--exp arg Credit card expiery date (YYMM) wehn doing CNP
transaction
--holder-id arg Credit card holder's ID number wehn doing CNP
transaction
--zip arg Credit card holder zip code address
--payments arg Transaction number of payments in payments
transaction
--first-payment arg Transaction first payment in payments
transaction. Can be equal 0 or not to be passed to create
equal division.
--credit-payments arg Transaction number of payments in credit
transaction
--output-file arg Path to result if process exited with code 0
--auth-num arg Authorize number
--tip arg Tip amount
--msr-data arg Tack2 from magnetic stripe reader
cancel options:
--original-uid arg Original UID (mandatory)
Each option exits with integer refering the error occured. Please see the function in the API to get more information.
First we need to make an establishment to the processor. Conider we have ***config.ini*** as follows: ```ini [service] retailer = 0883012 proc-ip = 193.142.151.62 ``` So we can establish our service to 0883012 over 193.142.151.62 which is Shva test enviorment ```sh SPIShell establishment –config-file=config.ini ``` without config file we could do the same ```sh SPIShell establishment –retailer=0883012 –proc-ip=193.142.151.62 ``` Let's say our Pinpad is located at 10.0.1.20: without config file we could do the same ```sh SPIShell addpinpad –id=1 –ip-addr=10.0.1.20 ``` and we have another one connected in USB and got the name COM3: ```sh SPIShell addpinpad –id=2 –com-port=COM3 ``` Now let's do a transaction with the amount of 5.00 ILS , with the USB pinpad: ```sh SPIShell.exe transaction –amount=500 –pinpad=2 –output-file=result.json ``` If we exited with code 0 and transaction succeded in ***result.json*** we'll find the following content: ```python {"Result":0,"ResultMessage":"העסקה אושרה","merchent_receipt":[{"תאריך":"02/05/18 14:25"},{"מספר מסוף":"0883012"},{"גרסת תוכנה":"01.05.26"},{"מספר עסק":"0300012"},{"כרטיס":"ויזה קלאסיק"},{"מספר":"4550000000066138"},{"מספר שובר":"01013031"},{"UID":"18020514254708830127502"},{"RRN":"803614635514"},{"סידורי ש":"C7"},{"סידורי כ":"000"},{"TSI":"0000"},{"ARC":"00"},{"TVR":"0000000000"},{"סוג עסקה":"חובה"},{"אישור מנפיק":"0635514"},{"גורם מאשר":"חברה"},{"אופן ביצוע":"Contactless EMV"},{"זיהוי יישום בשבב":"A0000000031010"},{"סוג אשראי":"רגיל"},{"סכום עסקה":"5.00 שח"},{"Verified by device":""},{"חתימת הלקוח":""},{"טלפון הלקוח":""}],"customer_receipt":[{"תאריך":"02/05/18 14:25"},{"מספר מסוף":"0883012"},{"גרסת תוכנה":"01.05.26"},{"מספר עסק":"0300012"},{"כרטיס":"ויזה קלאסיק"},{"מספר":"6138"},{"מספר שובר":"01013031"},{"UID":"18020514254708830127502"},{"RRN":"803614635514"},{"סידורי ש":"C7"},{"סידורי כ":"000"},{"סוג עסקה":"חובה"},{"אישור מנפיק":"0635514"},{"גורם מאשר":"חברה"},{"אופן ביצוע":"Contactless EMV"},{"זיהוי יישום בשבב":"A0000000031010"},{"סוג אשראי":"רגיל"},{"סכום עסקה":"5.00 שח"},{"Verified by device":""}],"solek_auth_num":"","issuer_auth_num":"","manpik":1,"solek":6} ``` In order to batch all transaction: ```sh SPIShell.exe endofday –config-file=config.ini –report-file=report_output ``` Report output is located in ***report_output*** now.
1.8.2