ICIC Payment Gateway integration

 Courtesy: Nitto Tobby Varghese

To intergrate payment gateway we need Need php modules mod_fcgid (FCGI module for Apache), FCGI and Tomcat
(you can also select other PHP module for future requirement e.g. GD, SOAP, curl, Zend, Zlib, Zip bizip, MySQLi )

1) Download the file “php-java-bridge_6.2.1_documentation.zip” from this link.
   This link will give you JavaBridge.war and documentation folder once you extract this downloaded file.

http://sourceforge.net/projects/php-java-bridge/files/Binary%20package/php-java-bridge_6.2.1/php-java-bridge_6.2.1_documentation.zip/download?use_mirror=citylan

2)  You can extract using the following Linux command "jar xvf JavaBridge.war"
    Copy this JavaBridge.war file to your online Linux server tomcat location
   
   in Plesk /var/lib/tomcat5/webapps/
   in cpanel: /usr/local/jakarta/tomcat/webapps
  
3) Then upload the JavaBridge.jar and php-servlet.jar, located under JavaBridge/WEB-INF/lib directory to this location of your server /var/lib/tomcat5/shared/lib/

/usr/src/WEB-INF/lib/----> /usr/local/jakarta/tomcat/webapps/JavaBridge/WEB-INF/lib/

4) Restart tomcat service

5) Once you run the command to restart using putty then a JavaBridge folder will be automatically created on the server

6) Then login to your ICICI merchant admin panel with required login details and download the key file and SFA files (php.zip) and extract it on your home directory of the domain. The file will give you 2 zip files named as SFA_Dependencies.zip and SFAClient.zip and a file PHP Sfa Guide.pdf

REMEMBER: you can download the key only once. So keep the key safe.

7) Now we need sfa.jar file that can be found under “SFA_Dependencies.zip” file so you need to extract SFA_Dependencies.zip to get the sfa.jar and edit the sfa.properties file with the following entries:

==================
motoURL=https://payseal.icicibank.com/mpi/Moto.jsp
sslURL=https://payseal.icicibank.com/mpi/Ssl.jsp
verbose=true
Key.Directory=/home/XXXX/public_html/key
OS.Type=UNIX
epgURL=https://payseal.icicibank.com/mpi/PGServSFA
traceLog=/var/log/tomcat5
===================

Once you edit the sfa.properties file then put the file in sfa.jar file. You can use jar command Jar -xvf sfa.jar to extract file and once you successfully edited the sfa.properties then you can use jar command Jar -cvf sfa.jar com sfa.properties to zip the file.

jar -cvf sfa.jar com sfa.properties

8) Then copy all the 6 jar files to /usr/local/jakarta/apache-tomcat-5.5.36/webapps/JavaBridge/WEB-INF/lib/

JAR Files to copy: cryptix32.jar, jcert.jar, jnet.jar, jsse.jar, servlet.jar, sfa.jar

9) Create a folder key in your home directory and give 777 permisison. Specify the path in sfa.properties file.

Key.Directory=/home/XXXX/public_html/key

10) in homedirectory under SFAClient edit SFAResponse.php and edit the following

$strMerchantId="00001203";
$astrFileName="c://key//00001203.key";

Note : Mercant ID must be same as the .key file name. e.g. if file is 00000001.key then Merchant ID must be 00000001

11) Also edit and correct TestMoto.php and TestSSL.php

in TestSSL.php edit and set SFAResponse.php path

eg: http://10.10.10.147:8756/SFAResponse.php to http://localhost/SFAClient/SFAResponse.php
Also edit merchat ID

ie in TestSSL.php

$oMerchant->setMerchantDetails("MERCHET ID","XXXXX","XXXXXX","193.545.34.33",rand()."","Ord123",

12) Final Step:

browse http://domainname/SFAClient/TestSSL.php if everything is correct you will see ICICI gateway

ALL THE BEST !!!!!!!!!!!!!!!!


2 comments:

  1. Well, I am not that much of tech savvy to understand what you have posted. I have a website for cake shopping and I am planing to launch online ordering facility. Everyone is saying that integrate secured payment gateway with your website. My question is that what are the general requirements for payment gateway integration and how I can select the best payment gateway.

    ReplyDelete
  2. The India online Pay Transactions are secure. Users can make the payment within Seconds, and all the payment information is encrypted under PCI DSS Compliance

    ReplyDelete