Integrating a payment gateway is fast and easy with LemonStand
4 | published by Danny Halarewich on Tuesday, September 08, 2009
As we draw closer to releasing our free, public beta, we have been working on implementing several payment gateways in addition to PayPal. At first we didn't plan to include these in the beta, but it's been a great experience so far and we're finding it hard to stop!
We have already integrated support for PsiGate, and it went very smoothly. We wanted to tell you a little bit more about the process of integrating a payment gateway into LemonStand.

LemonStand turns 4 tasks into 1
LemonStand makes it possible to develop a new payment module in just a few hours, instead of days. Usually, each payment module must be able to solve these 4 tasks:
- Display the configuration form, for setting up the payment gateway user name and password, and other gateway-specific parameters.
- Display the payment form on the front-end store
- Display the payment form in the administration area, enabling LemonStand administrators to process an order manually, if they have the customer card number.
- Process information entered into the payment form, and send request to the payment gateway. Then process the gateway response and mark the order with “payment processed” status.
Three of these task are automated by LemonStand. When you develop a new payment module, you don't need to do everything from scratch. For example, you don't need to build the module configuration and the administration payment forms by hand. Forms in LemonStand are built automatically using information about the form fields. So, to build the configuration or payment form, you only need to specify which fields you want to add to the form, what labels they should have, and what type of input control should be used (a plain text field, drop-down menu, checkbox and so on). You specify this information using simple PHP code in your module class. You don't even have tot worry about saving the configuration options to the database – LemonStand will save everything for you.
Thus, when you build a new payment module, you don't need to waste time on things which are common for every payment module – building forms, saving or loading configuration data. Instead of that, you can concentrate on the module-specific logic like sending specific data to the payment gateway and parsing the response. LemonStand solves all common tasks for you, leaving you a minimal amount of work to do.
What we're working on now
In preparation for our beta release we are knocking out modules to support as many payment gateways as possible. We have been working with merchant solution providers on setting up sandbox accounts so that we can develop and test as many as possible. At the moment we have received test accounts from FirstData/LinkPoint, Authorize.net, SagePay, 2Checkout and PaymentExpress. We are working on getting test acocunts with VersaPay, Moneris, HSBC, SecureTrading and Elavon. We are not promising to support all of these gatewaya at the time of beta release, but we're doing our best to work with providers that are cooperating with us.
And as we said before, we'll continue to add support for more and more gateways into the future, after the beta and even version 1.0 of LemonStand is released.


