RONKONKOMA - The Long Island Rail Road (LIRR) has begun testing wireless machines that allow riders to purchase their tickets onboard with debit and credit cards.

The Ticket Issuance Machine, or TIM, uses an iPhone 4 and a handheld credit card swipe to print out the train passes. Conductors will be testing them on trains between Ronkonkoma and Greenport in a pilot program through October.

At $1,200 for each machine, the program is costing the LIRR about $40,000. If it's successful, the devices could be rolled out systemwide.

Riders will still have to pay more to purchase a ticket onboard instead of at the station.