Sunday, August 5, 2012

PHP Tutorial Online, Beginners Tutor Online, PHP eBooks

Learn About PHP online Materials, Download PHP E books Online, Online PHP tutorials, PHP Materials online.



Soure From: http://www.slideshare.net/. We are not copyrighted for this materials. we are placed embedded code from slideshare website

By PHP with No comments

Saturday, August 4, 2012

eSELECTplus Moneris Payment Gateway Integration - osCommerce

It’s a canada based Payment gateway solution provider. Moneris payment gateway provide various kit based on the opensource languages. Here we provide integration steps for osCommerce opensource.

eSELECTplus Moneris Payment Gateway Integration Steps

1.     Download the osCommerce Payment kit from eSELECTplus Moneris website which is already registered.
2.     Extract payment folder.
3.     Now we open phpmyadmin database for our oscommerce via cPanel/any other access
4.     Downloaded folder have Moneris.sql file, run this into osCommerce database
5.     Rename the "module.payment.moneriscampg.php” into "moneriscampg.php" and move to the \catalog\includes\modules\payment" folder on your web server.
6.     Rename the "language.english.moneriscampg.php" file into "moneriscampg.php” and move to "\catalog\includes\languages\english\modules\payment" folder on your web server.
7.     from the downloaded folder have "CANmpgClassesOsc.php ",  “CANmpiClassesOsc.php” files. Copy and paste into "\catalog\includes\classes\" folder.
8.     Move the file “orders_addon_campg.php” into to “\catalog\admin\” and then insert bolded code in “\catalog\admin\orders.php” as displayed below. (Approximately at line 204):

<?php


if (tep_not_null($order->info['cc_type']) || tep_not_null($order->info['cc_owner']) ||


tep_not_null($order->info['cc_number'])) {


?>


<tr>


<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>


</tr>


<tr>


<td class="main"><?php echo ENTRY_CREDIT_CARD_TYPE; ?></td>


<td class="main"><?php echo $order->info['cc_type']; ?></td>


</tr>


<tr>


<td class="main"><?php echo ENTRY_CREDIT_CARD_OWNER; ?></td>


<td class="main"><?php echo $order->info['cc_owner']; ?></td>


</tr>


<tr>


<td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td>


<td class="main"><?php echo $order->info['cc_number']; ?></td>


</tr>


<tr>


<td class="main"><?php echo ENTRY_CREDIT_CARD_EXPIRES; ?></td>


<td class="main"><?php echo $order->info['cc_expires']; ?></td>


</tr>


<?php


}


?>


</table></td>


</tr>


<?php include ("orders_addon_campg.php"); ?>


<tr>


<td><?php echo tep_draw_separator(‘pixel_trans.gif’, ‘1’, ‘10’); ?></td>


</tr>


<tr>


<td><table border=”0” width=”100%” cellspacing=”0” cellpadding=”2”>


<tr class=”dataTableHeadingRow”>


<td class=”dataTableHeadingContent” colspan=”2”><?php echo TABLE_HEADING_PRODUCTS; ?></td>


<td class=”dataTableHeadingContent”><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>


<td class=”dataTableHeadingContent” align=”right”><?php echo TABLE_HEADING_TAX; ?></td>


<td class=”dataTableHeadingContent” align=”right”><?php echo


TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>


<td class=”dataTableHeadingContent” align=”right”><?php echo


TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>


<td class=”dataTableHeadingContent” align=”right”><?php echo


TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>


eSELECTplus CAN - osCommerce Shopping Cart July 19, 2011


Page 6 of 17


<td class=”dataTableHeadingContent” align=”right”><?php echo


TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>


</tr>

9.     Modify the error message text content display in the shopping cart go to “\catalog\includes\languages\english\modules\payment\moneriseselectplus.php”.
10.  Now we logged into osCommerce Admin panel ->Modules ->Payments
11.  Payment has the payment gateway lists, Click on “Install” to enable the Moneris eSELECTplus payment module and press edit to configure the payment parameters.
12.  Once configure Now go to front end to test product purchase using eSelectplus.
13.  If we have any issues in the test order, we need to check  cURL info settings,
a.     cURL CA Root Certificate File:
b.    The default installation of PHP/cURL does not include the cURL CA root certificate file. In order for the eSelectPlus PHP API to connect to the eSelectPlus gateway during transaction processing, the ‘mpgclasses.php’ file that’s included with the PHP API package needs to be modified to include a path to the CA root certificate file. Follow the instructions below to set this up.
c.     If cURL was not installed separately from your PHP installation, libcurl is included in your PHP installation. You will need to download the ‘cacert.pem’ file from ‘http://curl.haxx.se/docs/caextract.html’ and save it to the necessary directory. Once downloaded, rename the file to ‘curl-ca-bundle.crt’ (e.g. 'C:\path\to\curl-ca-bundle.crt'). If cURL was installed separately from PHP, you may need to determine the path to the cURL CA root certificate bundle on your system (e.g. 'C:\path\to\curl-ca-bundle.crt').
d.    Insert the code below into the "CANmpgClassesOsc.php ",  “CANmpiClassesOsc.php” files as part of the cURL option setting, at approximately line 73 below the line ‘curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);‘
curl_setopt($ch, CURLOPT_CAINFO, getwed().'\curl-ca-bundle.crt');
getwed() – Is the function in the PHP, which is used to get the document root[absolute filepath]

Test Card For Moneris eSELECTplus Payment Gateway
MasterCard: 5454545454545454
Visa:  4242424242424242 or 4005554444444403
Amex:  373599005095005

Test IDs

store_id
api_token
Username
Password
store1
yesguy
DemoUser
password
store2
yesguy
DemoUser
password
store3
yesguy
DemoUser
password
store5*
yesguy
DemoUser
password

For more information please read the document which is included in the payment gateway kit.
Reference from eSelectPlus_OSCommerce_IG_CAN.pdf which is provided by eSelectPlus payment gateway. Please ready document which is provided by the payment gateway before going to proceed. We are not responsible for any issues.


By PHP with 1 comment

    • Popular
    • Categories
    • Archives