Verifone
Getting started with Verifone for Number
Last updated
Was this helpful?
Getting started with Verifone for Number
Last updated
Was this helpful?
The Verifone card readers are small hand-held devices. They communicate with your computer on a USB port. A chip transaction is comprised of about a dozen transmissions between the host (your computer) and the device, and then finally to the Number cloud platform.
Using the Verifone card readers offers a highly secure method of collecting cardholder data.
Cardholder data is encrypted within the device itself, and remains encrypted as it travels across the Internet to our PCI Level One Compliant processing platform.
When a merchant supports a Verifone card reader, it helps eliminate chargebacks for transactions which were run through the device.
Software Security Framework (SSF) is a re-working of the existing PCI standard PA DSS. The PA DSS has been retired since June 30, 2021. Number's "Aspen 3.1" is the first application to achieve the PCI Councils SSF certification, and it provides an end-to-end encrypted solution.
Currently, we offer three different options for collecting payments with the Verifone card readers, all of which require a Windows OS on the host computer.
Standalone desktop application (upon request)
This application has automatic updates and allows you to collect payments, create card-on-file and payment plans, process a card-on-file, void or credit, settle transactions, and do reporting with an option to export to a PDF.
Browser-based interface
We developed a Windows service which uses Cross-Origin Resource Sharing (CORS) to communicate with the browser. The Win service will return a simple XML response for each transaction directly to the HTML/PHP/ASP.NET page for consumption by the host application.
As an integrator, this allows you to write simple client-side scripts within your own web applications to initiate transactions with a local Verifone. You can also use this service with our Virtual Terminal to avoid writing any code.
Number Verifone SDK
This DLL provides a means of collecting payments and creating card-on-file plans. Used in conjunction with your custom windows application, you can manage all aspects of your payment requirements.
There are 2 categories of integrations which require two different sets of files
Browser-based - install our Win service which contains all your dependencies, including the drivers and console installer.
Desktop-based - install our SDK, then use separate installers for drivers and a custom event log.
If you wish to use the standalone desktop application for Verifone, contact Number for installation files and instructions.
For any browser-based Implementation using the Verifone, you will need to install the local win service. This includes our Virtual Terminal implementation as well as your own custom web applications.
To Begin: Download the compressed archive:
To install the Win service:
Connect your device to a free USB port.
Allow the device to initialize.
Extract the above archive to a location of your choice.
Locate the EXE file and right click on it to choose Run as administrator.
Wait for the application to finish, then reboot computer.
The above installation package does the following:
Installs USB drivers for the Verifone.
Creates a custom event log with Windows named EPmiddleware.
Installs a certificate which encrypts data between the browser and the Windows service.
Installs the EasyPay Verifone MiddleWare E2E 1041 Service which listens on port 8031.
Your website can now issue commands to the Win Service as is demonstrated using the sample site:
You can download the entire site here:
Sample Verifone Website Content
To run the Verifone demo website, you must have the Verifone Windows service installed.
You can use our Virtual Terminal together with the Windows service. It has built-in support for Verifone. This way, you won't have to build your own UI or write any code. After installing the service, contact Number to have this feature activated.
You can read more about using the Virtual Terminal in the Virtual Terminal guide.
You will find a script file named EasyPayVerifone.js in the sample VeriFone website provides the following functionality:
EMV sale only
EMV sale and save card
Manual sale (keyed entry) sale only
Manual sale and save card
EMV save card only
Reset the Middleware and Verifone
In the script file named EasyPayVerifone.js you can inspect the function named EMVSaleCombo():
EMVSaleCombo(SaveCard)
It expects the following objects
SaveCard ( true / false)
SessionKey ( string )
AccountHolder ( Json )
EndCustomer ( can be the same as Accountholder )
PurchaseDetails (Json)
Amount ( can be numeric value or JSON object )
The SessionKey is obtained by using our API to Authenticate. Your Server can pass this down to your client side script.
The AccountHolder object looks like this. Note the embedded address object:
The End Customer object is identical to the Accountholder object . You may not have two objects so you can set both to the same value.
The PurchaseDetails object provides two user defined fields and a service description for your use and this object looks like this:
The Amount object supports both a simple number such as "103.41" or an object such as the following:
If you don’t plan to collect processing fees then you can just send a simple numeric value.
Once you have compiled all Json Object data you make your call to the local windows service as is outlined in the EasyPayVerifone.js script file.
Here is a sample URL GET request:
The red Button on the Verifone can be used to Cancel the current operation and also to setup for the Ready State. Your software will be notified of the Reset should this Occur.
You can also call the function named UnlockVerifone(); which will reset both the software and the hardware so that you can once again enter the ready state.
If you ever send a command to the Verifone Middleware while it is still processing the previous one, it will respond with an error stating that is it BUSY. In the rare situation where the Middleware remains Busy for an unreasonable amount of time you can issue the UnlockVerifone(); command in order to return the device to the ready State. You can also press the red Button on the device 2 times to enter the ready state.
If you continue to receive a Busy response from the middleware, but you don't believe that waiting will yield productive results, you may use the unlockVerifone
function to return the device to Ready state.
For browser type Verifone operations, the middleware provides a response object in XML format. This object can be de-serialized or can be consumed as XML. Currently, there are two response object types:
WidgetArgs
- sale response when requesting an authorization for a non-zero dollar amount, with the option to save the card;
WidgetArgs2
- consent response when requesting to only save the card.
It is important to consume the WidgetArgs
response in a particular order, starting with TxEventTyp
.
TxEventTyp
string
The type of event that occurred during the transaction, indicating success or failure.
Values: TxApproved, TxDecline, TxReversed, PreSaleDeviceCode, PostSaleDeviceCode, TimeOut, AspenError, AuthFail, FunctionFail, Exception.
Here are actions to take for each possible value of TxEventTyp
:
TxApproved
The sale was approved by the issuer. You should examine and store these values:
TxID
- the unique ID of the transaction; needed to refund or void the transaction.
TxnCode
- the transaction approval code.
ApprovedAmt
- the $ amount charged to the card.
TxDecline
The sale was declined by the issuer. You should examine and store these values:
TxID
- the unique ID of the declined transaction.
TxnCode
- the transaction decline code.
TxReversed
The issuer approved the transaction, however, during the final interaction with the chip, the device required the transaction to be declined, and the transaction was voided (reversed).
PreSaleDeviceCode
An error occurred within the device prior to the transaction getting submitted to the issuer. Examine ErrCode
and ErrMsg
for more information.
PostSaleDeviceCode
An error occurred within the device after the transaction was submitted to the issuer. Examine ErrCode
and ErrMsg
for more information.
Timeout
The user waited too long to insert the card or interact with the device. Examine ErrCode
and ErrMsg
for more information.
AspenError
An error occurred on Number Aspen Cloud processing servers. Examine ErrCode
and ErrMsg
for more information.
AuthFail
When doing a save card only operation, the issuer declined to verify the card details when executing a $0 authorization. The card will not be saved. You should examine:
TxID
- the unique ID of the declined transaction.
TxnCode
- the transaction decline code.
FunctionFail
Returned when you supply improper or out of range values in the request, or when you execute a Verifone command while the previous action has not yet completed. Examine ErrCode
and ErrMsg
for more information.
Exception
An error was encountered in the local Windows service. Examine ErrCode
and ErrMsg
for more information.
It is important to consume the WidgetArgs2
response in a particular order, starting with ConsentEventTyp
.
ConsentEventTyp
string
The type of event that occurred during the save card on file operation, indicating success or failure.
Values: ConsentSuccess, ConsentFailed, PreConDeviceCode, PostConDeviceCode, TimeOut, AspenError, AuthFail, FunctionFail, Exception.
Here are actions to take for each possible value of ConsentEventTyp
:
ConsentSuccess
The consent was created and card was saved successfully. You should examine and store ConsentID
to be able to charge the customer later.
ConsentFailed
The consent was not created. Examine ErrCode
and ErrMsg
for more information.
PreConDeviceCode
An error occurred within the device prior to the card being submitted. Examine ErrCode
and ErrMsg
for more information.
PostConDeviceCode
An error occurred within the device after the data was submitted. Examine ErrCode
and ErrMsg
for more information.
Timeout
The user waited too long to insert the card or interact with the device. Examine ErrCode
and ErrMsg
for more information.
AspenError
An error occurred on Number Aspen Cloud processing servers. Examine ErrCode
and ErrMsg
for more information.
AuthFail
When doing a save card only operation, the issuer declined to verify the card details when executing a $0 authorization. The card will not be saved.
FunctionFail
Returned when you supply improper or out of range values in the request, or when you execute a Verifone command while the previous action has not yet completed. Examine ErrCode
and ErrMsg
for more information.
Exception
An error was encountered in the local Windows service. Examine ErrCode
and ErrMsg
for more information.
Important : You can not run both the Verifone Middleware and the Verifone SDK together at the same time. Both packages will need to have control over COM 9 so only one can be active at one time.
Installation
For you to directly interface with the Verifone using our SDK, you will need the Verifone drivers with the custom logging package, and the SDK reference files:
USB drivers and Logging Package
When installed, the first component will provide USB drivers and create a virtual COM 9 port. In addition, it will add a unique event log to the existing windows event log collection.
To install the first component, please do the following:
Connect your Verifone to the USB port which you plan to utilize.
Wait until the device is fully initialized.
Download and extract the ZIP file named Setup_USB_log.zip to the location of your choice.
Right click the EXE named Setup_USB_log.exe and choose Run as administrator.
After installation, there should be a new windows event log named EPmiddleWare.
With the Verifone plugged in you should also see an entry in the device manager attached to COM 9
To use the SDK, you only need to directly interface to the file named EP.Enterprise.Vx820.dll. The other files are dependencies. Make sure to extract all 4 of the files to the location of your choice.
EP.Enterprise.Vx820Lib.dll
EP.Vx820.Common.dll
EP.Enterprise.Vx820Lib.dll.config
DPayments.DPaymentsSDK.dll
Number has developed a sample executable program using the SDK which allows you to authorize cards, save cards, and create payment plans:
Initially you will need the following to begin processing cards
Number URL Endpoint ( API URL )
Account Code
Token
For testing you can use the default URL supplied but it is important that you consult with Number personnel to determine the best endpoint prior to going live. Your Account code and Token will be supplied to you for your sandbox account.
Once you have authenticated you can proceed to the SALE page.
Take Notice of the MERCHID field as each Number Account can have one or more merchant records associated with it. For Live accounts you will be provided a deployment form which identifies these along with their identifier {1,2,3} etc.
For a typical Chip transaction, you only need to specify an amount and press INITIATE CHIP. The device should now prompt you to insert the CHIP. If you check the SAVE CARD checkbox then Number will VAULT the card details after the successful sale and return a CONSENT ID which you can use to authorize the card directly using our API at a later time. If you want to KEY IN the card details directly into the VeriFone, you will enter Account Holder Information then press INITIATE MANUAL TRANSACTION.
To reference the SDK
using EP.Enterprise.Vx820Lib;
Important : manage only one single instance of the class ( this allows you to operate on the COM 9 port )
private EP_Verifone_Mod EPVerifone;
Here are some steps required prior to doing a card authorization
Now you can initiate a transaction
Wait for your transaction to complete and event will fire
For additional coding samples including creating recurring payment plans please refer to the sample SDK program
Once you initiate a transaction the EPVerifone class will set the DeviceIsBusy flag to True. make sure you monitor this flag before attempting another transaction. EMV transactions can take time and you will expect the On_Device_Msg Event to Fire to alert you of the Results. If for some reason the DeviceIsBusy flag stays true for an unreasonable amount of time you should issue the UnLockAndReset(ref ErrStr) command which will reset both the SDK Software and the Verifone Device in order for you to once again enter the Ready State. There is also a Red Button on the Verifone device which you can press two times to reset the process and fire the On_Device_Msg Event.
After installing all the dependencies for either the SDK or the browser-based approach,, you will notice a new Windows event log has been registered named EPmiddleWare.
This event log stores information about processed transactions as well as any errors encountered, and serves as a powerful troubleshooting component.
With the Verifone Windows event log installed, a merchant can export the log and send it to Number if any unexpected behavior is encountered.
Both the middleware service and the SDK will attempt to maintain a continuous connection to the Verifone device. If your hardware is suspended or enters sleep, this can cause issues. To avoid these, please make sure to modify your USB power settings.
For Windows 10, you'll need to go to Control Panel > Power Options > Edit Plan Settings.
On Windows 11, open Control Panel > Hardware and Sound > Power Options > Edit Plan Settings.
Go to Advanced power settings and change the USB settings to disable USB selective suspend for your active power plan.
When using the Verifone, make sure that your machine is running the power plan with the modified settings. All power plans have separate power settings.
If you don't see the USB power settings on your machine, you might need to expose them.
Run the Command Prompt as an administrator.
Type the command below you into the elevated command prompt, and press Enter:
After running the command, reboot your computer, then reopen your advanced power settings following the steps listed above.
When consuming a Verifone response, check RespMsg
for a friendly response message.
When consuming a Verifone response, check RespMsg
for a friendly response message.