AlegroCart open source E-commerce
Web hosting by Host1Plus

Adding a Payment Gateway

knowledge base and frequently asked questions

Adding a Payment Gateway

Postby Brent » Sun Sep 30, 2012 5:34 am

To add a payment gateway, You must first create the files in admin to add settings required to run the module.
Samples in admin are located as follows.

You will need to add the settings for this extension to be added as well. This is a sample for ccAvenue.
Code: Select all
# Extension ccAvenue
SET @lid=1;
SELECT @id:=extension_id FROM extension WHERE `controller` = 'payment_ccavenue';
INSERT INTO `extension` (`extension_id`, `code`, `type`, `directory`, `filename`, `controller`) VALUES (@id, 'ccavenue', 'payment', 'payment', 'ccavenue.php', 'payment_ccavenue') ON DUPLICATE KEY UPDATE extension_id=extension_id;
SELECT @id:=extension_id FROM extension WHERE `controller` = 'payment_ccavenue';
INSERT INTO `extension_description` (`extension_id`, `language_id`, `name`, `description`) VALUES (@id, @lid, 'ccAvenue', 'ccAvenue Gateway') ON DUPLICATE KEY UPDATE extension_id=extension_id;

You then need to create the code in the catalog to actually process the payment.
Sample code as follows.
catalog->model->payment->model_payment.php You can either add code to this file or create a new one of your own.

If you have special, sensitive code required to process payments, this code would be better located in the library for better security.

That's about all you usually need.
User avatar
Site Admin
Posts: 4365
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Return to FAQ / Layouts / Knowledge Base

Who is online

Users browsing this forum: No registered users and 1 guest