Getting Started with EMV and Payment Terminal Toolkit for i

by | Oct 26, 2017

As of October 2015, the payment industry liability shift is active, making your company liable for accepting fraudulent charges. To be protected from this liability, your company needs to be prepared to accept chip-enabled cards.

How do I make my IBM i business compliant with the payment liability shift?

Payment Terminal Toolkit for i

PTTI is a straightforward and safe tool to protect you from liability when accepting payment in EMV chip-card readers. PTTi makes it simple to integrate with the EMV chip reader on your payment devices, helping you ensure compliance with the payment liability shift.

1) What you need to get started

Verifone Payment Terminals

Verifone is one of the largest payment terminal providers in North America. Their EMV-compatible card readers have been widely implemented in business nationwide.

Verifone payment terminals

Verifone payment terminals

 

Payment Terminal Toolkit for i

PTTi is an API toolkit designed to simplify your Verifone integration, allowing you to easily build your POS software on your IBM i – all in native RPG.

PTTi is available as a free, full-featured, 30-day trial. Grab your PTTi trial download and follow the installation instructions to get started.

Once your installation is complete, the command DSPMCHINF should output a screen similar to this:

DSPMCHINF output

DSPMCHINF output

 

2) Connecting your Verifone device

Once PTTi is installed and the temporary key is applied, you can register your devices.

You’ll need one of the supported terminals, registered in the Verifone PAYware Connect portal (contact your Verifone representative for more information) and accessible on your network. It only takes one command to connect to and authenticate with a Verifone terminal – REGVFNDVC.

REGVFNDVC parameters pt 1.

REGVFNDVC parameters

REGVFNDVC parameters pt 2.

REGVFNDVC parameters

REGVFNDVC parameters pt 3.

REGVFNDVC parameters

When prompted by the device, input the 4-digit code specified in the “Entry Code” parameter. If your registration is successful, the following message will display:

Successful device registration.

Successful device registration

Your Verifone device is now ready for use with PTTi.

 

3) Talking to the device

Step 1: Open a session

What can we do now? We can start sending requests to the terminal. For each transaction, you will need to first open a session between your IBM i and the registered Verifone terminal. This API, VFN_StartSession(), is demonstrated in the example program T_STRSES. Let’s modify this program to target your test device, like so:

testdevice in T_STRSES

Targeting testdevice in T_STRSES

Compile the modified program, and call it. If the call was successful, you should see something like this in your job log:

Successful session start.

Successful session start

And your payment terminal display (on an MX Solutions device) should look something like this:

An open session on the MX915 device

An open session on the MX915 device

Step 2: Line item display

The next step is to add items to this display with VFN_AddLineItem(). Let’s modify and call T_ADLNITM to add a single line item to the device display:

A new line item

A new line item

If you want to experiment more with the line item display, VFN_AddLineItem() can be used to send multiple lines at once (see T_ADLINITMS), or VFN_OverrideLineItem() and VFN_RemoveLineItem() can change which lines are displayed on-screen.

 

Step 3: Capture a payment

Once you are done adding or removing line items from the display, we can proceed to card capturing with VFN_Capture(). Modify the T_CAP example program to target your test device, and call it. You should see the payment prompt appear on your terminal:

Payment prompt

Payment prompt

Note that this operation will process a payment capture, and should be run in a test environment – do not use a real card on a production system unless you want to be out a few bucks.

Swipe or insert your card, follow the on-screen prompts, and complete the transaction. Once the operation completes, you should see messages in the job log that show card and payment information (if the transaction was successful) or error information returned by the Verifone device (if the transaction was unsuccessful).

Successful capture

Successful capture

 

Step 4: End the session

Once you’re done with this transaction, make sure you call the VFN_EndSession() API (demonstrated by the T_ENDSES example program) to properly end the session between the Verifone terminal and your IBM I.

 

Download our free trial!

 

Documentation (And more!)

Payment Terminal Toolkit for i includes many APIs to help build a robust a full-featured POS program. Review our documentation page for a complete list and more helpful example programs.

RPG-XML Suite

  • Call web APIs from RPG
  • Process XML and JSON
  • Offer web services

Litmis Spaces

Affordable IBM i cloud hosting

CyberSource Toolkit for i

  • Process credit cards from native RPG
  • Integrate CyberSource payment services

Follow Us

Interested in learning more about PTTi? Shoot us a message!

  • This field is for validation purposes and should be left unchanged.

Get Social

Share to your favorite social platform