1. Unzip SFAClient.zip. This will create a folder called SFAClient
2. SFAClient contains the following files and directory.
1. Sfa – SFA Client library (contains the PHP Sfa library)
2. Test Pages – Sample pages for transactions and a test page (test.php) for testing php.
PHP Web Application Directory Structure – Sample Example
· Create the following PHP Web application directory structure as given below
o E.g. the Merchant website directory name is “Merchant_Site_Dir”.
· Copy all the directory and files from unzipped SFAClient to Merchant_Site_Dir .
§ Place the directory Merchant_Site_Dir in C:/wamp/www/ as shown below.
· Sfa, Test Pages and sfa.properties
Note:
§ Sfa folder should be copied to the folder where TestPages/Merchant pages are present.
§ The directory names are case sensitive. Create them as mention above.
Changes in Test Pages
- Open the SFAResponse.php and made some changes
<?php
include("Sfa/EncryptionUtil.php");
$strMerchantId="00000001";
$astrFileName="c://key//sbi//00000001.key";
$astrClearData;
$ResponseCode = "";
$Message = "";
$TxnID = "";
$ePGTxnID = "";
$AuthIdCode = "";
$RRN = "";
$CVRespCode = "";
$Reserve1 = "";
$Reserve2 = "";
$Reserve3 = "";
$Reserve4 = "";
$Reserve5 = "";
$Reserve6 = "";
$Reserve7 = "";
$Reserve8 = "";
$Reserve9 = "";
$Reserve10 = "";
Note : Mercant ID must be same as the .key file name. e.g. if file is 00000001.key then Merchant ID must be 00000001.
- According to merchant type i.e. SSL or MOTO change select the file and make the changes
- e.g. if Merchant is SSL Merchant then change the TestSsl.php
<?php
include("Sfa/BillToAddress.php");
include("Sfa/CardInfo.php");
include("Sfa/Merchant.php");
include("Sfa/MPIData.php");
include("Sfa/ShipToAddress.php");
include("Sfa/PGResponse.php");
include("Sfa/PostLibPHP.php");
include("Sfa/PGReserveData.php");
$oMPI = new MPIData();
$oCI = new CardInfo();
$oPostLibphp = new PostLibPHP();
$oMerchant = new Merchant();
$oBTA = new BillToAddress();
$oSTA = new ShipToAddress();
$oPGResp = new PGResponse();
$oPGReserveData = new PGReserveData();
$oMerchant->setMerchantDetails("00000001","00001203","00001203","193.545.34.33",rand()."","Ord123","http://10.10.10.167/SFAResponse.php","POST","INR","INV123","req.Sale","100","","Ext1","true","Ext3","Ext4","Ext5");
?>
Put marchant id.
- e.g. if Merchant is Moto Merchant then change the TestMoto.php
Set the key directory path
· 'Key.Directory' should contain the name of the folder, which contains the merchant key. A trailing slash has to be included at the end of this value. The name of the file (.key file) need not be set. Save the file after making other relevant changes.
§ Key.Directory=D://WAMP//WWW//key//
Note: Don’t include key in key directory path.
· Enable the verbose parameter to “true” only when required to generate logs. These logs are to be used for debugging (while integration) and should not be set to “true” in production as it might lead to considerable amount of logs depending on the number of transactions.
· To verify the success of the above operations open the jar file again and check if the properties file has the values set.
Enabling Curl extensions
The curl extension files are
- libeay32.dll
- ssleay32.dll
These files should be present in to C:\WINDOWS\system32 and Php installation directory.
Open the php.ini file from PHP installation directory remove the semicolon ofextension=php_curl.dll.
Disabling mcrypt extensions (for PHP version <= 4.4.4)
- Open the php.ini file from PHP installation directory add the semicolon on start of line ;extension=php_mcrypt.dll (if semicolon not present).
Checklist
· Merchant should have access to ePG over https
· Check connectivity between php
1. Restart the IIS Server
2. Browse the testjava.php page either from browser of from IIS as shown below
i. Url : http://localhost/Merchant_Site_Name/test.php
Transaction Testing
· Restart the Apache
· Open the PHP page either from browser or from Apache
· If Merchant is SSL then open TestSsl.php else if Merchant is Moto then TestMoto.php
1. From IIS
2. From Browser
· Type the URL : http://localhost/Merchant_Site_name/TestSsl.php
Troubleshooting
Problem : In log file if you got SSL certificate problem….
Solution : Add the certificate CSR in \Sfa\cacerts.pem file. (Refer Adding Certificates in Cacertssection).
I have completed the cart and have all data collected from the user now I don't know that when user click the button to select debit card where to send him and what to send in the form in hidden way.
ReplyDeleteif you can send a example file along with it that will be much appreciated.
I got below error, please help me
ReplyDeleteError 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
At what point you are getting this error, While sending the details to Gateway of when you get the response from gateway
DeleteHi deovrat, we are also getting the same error........when we click the radio button of CREDIT / DEBIT Card , it shows the types of cards (radio buttons like master, maestro, visa, etc) and then asks for amount, but in the right side, shows this error eRROR 404 -- Not Found. I think that there is a validation either emi option mid OPTION - like 3, 6,9, 12 MONTHS not showing ... let me know how to integrate the emi option in php_wo_java FILES.... And when we show inspect element , it shows that a resource has moved , some image.gif, i think there was a icici wallet or pockets + emi option both which are failing to show up... Thanks and Regards - Jaya B Challa
ReplyDelete