Reputation: 1050
I would like to integrate my web system with card payment processing terminals. Within the system there is a payment module with the expenses of the client. If the client choose to pay with a debit/credit card, him/her will physically swipe their debit/credit card and follow the payment process. For that reason the system needs to communicate with the card payment terminal, so it could set automatically the type of payment (debit/credit), depending on what the client told to the cashier, and the amount of money to be paid. All of this needs to be set without human interaction with the terminal. (Like a POS)
The web-based system is written in php and there are some modules in python as well.
I have no idea where to start... Are there some libraries I can use?
Upvotes: 5
Views: 7019
Reputation: 703
I've been watching this question for the past hour to see if anybody can come up with something better. Haven't seen anything, so I'll give you what I know and hopefully it'll help.
As far as I'm aware, when you are processing a card via web site, it'll process as a web based transaction, or credit charge. In the past few different POS and payment portals I've been, as well as any site I've personally ever payed online for, I've never seen a debit option (where you enter your card's PIN number to authorize the transaction).
With that said, your first step is to get a card reader that can print the card information to your form. If you were to get a basic card reader and swipe your debit/credit card information through, you'll get a crazy string of numbers and letters. This will contain the card number, the card holder's full name on the card, as well as possibly the expiration date and security code located on the back. Different cards spit out different strings (think Mastercard/Visa/Amex).
In the past I've personally built card rendering scripts in JavaScript/jQuery that take the incoming text string from a swipe and split it up to the correct information you need to process the card. You can probably find a few online via Google. I would help give you some, but I'm under a very heavy NDA regarding the scripts I've made in the past. I can give you a good starting point and that is a lot of regular expressions and testing with all cards.
As far as processing the payments, I recommend Stripe.js personally. It is a decent system that is easy to get started with, has a ton of documentation and API ready for you to start. You can also use PayPal payments pro, which allows you to process payments with a custom form and no knowledge of PayPal processing it. Lastly, I have worked with Authorize.net and it was alright. I recommend Stripe above all else.
Sorry for the large wall of text, but this should help you get started at least. I have personally built web-based POS for companies with a end-user side that handles transactions and a POS side for the company where users walked in, purchased their items, and paid with a debit/credit card that was swiped at the computer and processed online.
Upvotes: 6