PHP Sfa Guide
PHP Sfa Guide
1
Copyright © ICICI Bank Limited. All rights reserved.
Copyright Information
Copyright © ICICI Bank Ltd. All rights reserved. No part of this document may be
reproduced, stored in retrieval form, adopted or transmitted in any form or by
any means, electronic, mechanical, photographic, graphic, optic or otherwise,
translated in any language or computer language, without prior written permission
from ICICI Bank Ltd.
Disclaimer
This document has been prepared in accordance with the accepted techniques for
solution specifications definition at ICICI Bank Ltd. The information represented
herein, has been gathered after studying market trends and inputs supplied by
expert consultants. The representations and related information contained in the
document reflect ICICI Bank’s best understanding of the business. However, ICICI
Bank makes no representation or warranties with respect to the contents hereof and
shall not be responsible for any loss or damage caused to the user by the direct or
indirect use of this document and the accompanying software package.
Further, ICICI Bank reserves the right to alter, modify or otherwise change in any
manner the content hereof, without the obligation to notify any person of such
revision or changes.
About Payseal
Payseal is brought to you by ICICI Bank Ltd. Payseal provides secure electronic
commerce payment solutions in the B2C & B2B environments.
2
Copyright © ICICI Bank Limited. All rights reserved.
About ICICI
ICICI Bank is India's second-largest bank with total assets of Rs. 3,997.95
billion (US$ 100 billion) at March 31, 2008 and profit after tax of Rs. 41.58 billion for
the year ended March 31, 2008. ICICI Bank is second amongst all the companies
listed on the Indian stock exchanges in terms of free float market capitalization*. The
Bank has a network of about 1,308 branches and 3,950 ATMs in India and presence
in 18 countries. ICICI Bank offers a wide range of banking products and financial
services to corporate and retail customers through a variety of delivery channels
and through its specialized subsidiaries and affiliates in the areas of investment
banking, life and non-life insurance, venture capital and asset management. The
Bank currently has subsidiaries in the United Kingdom, Russia and Canada,
branches in Unites States, Singapore, Bahrain, Hong Kong, Sri Lanka, Qatar and
Dubai International Finance Centre and representative offices in United Arab
Emirates, China, South Africa, Bangladesh, Thailand, Malaysia and Indonesia. Our
UK subsidiary has established branches in Belgium and Germany.
ICICI Bank's equity shares are listed in India on Bombay Stock Exchange and
the National Stock Exchange of India Limited and its American Depositary Receipts
(ADRs) are listed on the New York Stock Exchange (NYSE).After consideration of
various corporate structuring alternatives in the context of the emerging competitive
scenario in the Indian banking industry, and the move towards universal banking,
the managements of ICICI and ICICI Bank formed the view that the merger of ICICI
with ICICI Bank would be the optimal strategic alternative for both entities, and
would create the optimal legal structure for the ICICI group's universal banking
strategy. The merger would enhance value for ICICI shareholders through the
merged entity's access to low-cost deposits, greater opportunities for earning fee-
based income and the ability to participate in the payments system and provide
transaction-banking services. The merger would enhance value for ICICI Bank
shareholders through a large capital base and scale of operations, seamless access
to ICICI's strong corporate relationships built up over five decades, entry into new
business segments, higher market share in various business segments, particularly
fee-based services, and access to the vast talent pool of ICICI and its subsidiaries. In
October 2001, the Boards of Directors of ICICI and ICICI Bank approved the merger
of ICICI and two of its wholly-owned retail finance subsidiaries, ICICI Personal
Financial Services Limited and ICICI Capital Services Limited, with ICICI Bank. The
merger was approved by shareholders of ICICI and ICICI Bank in January 2002, by
the High Court of Gujarat at Ahmedabad in March 2002, and by the High Court of
Judicature at Mumbai and the Reserve Bank of India in April 2002. Consequent to
the merger, the ICICI group's financing and banking operations, both wholesale and
retail, have been integrated in a single entity.
3
Copyright © ICICI Bank Limited. All rights reserved.
Technical Contact
Email [email protected]
Tel 91-022-66673128
Operations Contact
Email [email protected]
Tel 91-022- 66673918
4
Copyright © ICICI Bank Limited. All rights reserved.
Installing the SFA PHP Library
Pre-requisites – The Merchant's machine where SFA will be
installed should have PHP with java support enabled.
c. http://php-java-
bridge.sourceforge.net/pjb/installation.php
Note:
6
Copyright © ICICI Bank Limited. All rights reserved.
2) jcert.jar – Required to establish the SSL connection with
ePG
4. Set the Jar files in the system classpath. This is not needed
in case the jar files have been copied to the extension di
rectory of JDK used.
Note: The extension directory can be checked from the
JavaBridge log as well. It is printed on startup of
JavaBridge. In case a J2EE backend (like tomcat or some
servlet engine) is configured for JavaBridge, then copy the
jars to the extension directory of the JDK used by the J2EE
backend.
7
Copyright © ICICI Bank Limited. All rights reserved.
the properties file
8
Copyright © ICICI Bank Limited. All rights reserved.
2. Unzipping shall create a folder called SFAClient.
The Merchants PHP pages can now start using the SFA library.
Test pages are shipped along with the distribution, which can
be used for test/understanding purposes.
Note:
9
Copyright © ICICI Bank Limited. All rights reserved.
Appendix A
The MOTO and the SSL Merchant’s use the Store Front
Adaptor for integrating with the Payment Gateway. This
appendix details the data that is passed from the Merchant to
the Payment Gateway via the Store Front Adaptor.
Note -
10
Copyright © ICICI Bank Limited. All rights reserved.
Merchant Information
11
Copyright © ICICI Bank Limited. All rights reserved.
Sr Parameter Details Valid values Mandato
No ry
8 astrRespMethod HTTP method (GET/POST) to Data with maximum Y
be used by the Payment size of 4 characters.
Gateway for posting the (GET/POST)
results of the transaction to
the Merchants site. In case of
SSL Merchants the value
should be POST as the
response is sent via a
redirection.
9 astrCurrCode Currency of the transaction Data with maximum Y
size of 3 characters.
ISO Alpha Currency
Code
‘INR’ for transactions
in Rupees.
10 astrInvoiceNo Invoice number generated by Alpha-numeric data N
the Merchants application with maximum size
of 20 characters
12
Copyright © ICICI Bank Limited. All rights reserved.
Sr Parameter Details Valid values Mandato
No ry
the Merchant for passing any size of 50 characters
specific data. Should be “true”
for SSL merchant
16 astrExt3 Reserved Data with maximum N
size of 50 characters
17 astrExt4 Additional field provided to Data with maximum N
the Merchant for passing any size of 50 characters
specific data
18 astrExt5 Additional field provided to Data with maximum N
the Merchant for passing any size of 50 characters
specific data
13
Copyright © ICICI Bank Limited. All rights reserved.
Function Name - setMerchantRelatedTxnDetails
15
Copyright © ICICI Bank Limited. All rights reserved.
Sr Parameter Details Valid values Mandatory
No
11 astrGMTOffset GMT Time Offset of the Data with N
Merchants sites locale maximum
size of 9
characters.
GMT+hh:m
m
16
Copyright © ICICI Bank Limited. All rights reserved.
Card Information
Manda
Sr No Field Details Valid values tory
1 astrCardType Data with maximum size of 5 Y
characters.
VISA –Visa
MC- MasterCard
2 astrCardNum Numeric data with maximum size of 20 Y
17
Copyright © ICICI Bank Limited. All rights reserved.
Ship To Address
The Payment Gateway will store the Ship To Address details in its database only if all
the details mentioned as mandatory are populated. If the merchant is not capturing
the Address then this object can be passed as null to the SFA. However, if the Class
is instantiated and passed to the SFA, then it is necessary to populate the fields
marked as mandatory
Sr Detail
No Field s Valid values Mandatory
1 astrAddrLine1 Alphabetic data with maximum size Y
of 50 characters
2 astrAddrLine2 Alphabetic data with maximum size N
of 50 characters
3 astrAddrLine3 Alphabetic data with maximum size N
of 50 characters
4 astrCity Alphabetic data with maximum size Y
of 30 characters
5 astrState Alphabetic data with maximum size Y
of 30 characters
6 astrZip Numeric data with maximum size of Y
10 digits
7 astrCountryAlp Alphabetic data with maximum size Y
haCode of 3 characters IND for INDIA
8 astrEmail Alpha-Numeric data with maximum N
size of 80 characters
18
Copyright © ICICI Bank Limited. All rights reserved.
Bill To Address
Sr Mandato
No Field Details Valid values ry
1 astrCustomerIIf customer is Data with maximum size of 10 N
d a registered characters
customer with
the merchant,
then his ID
needs to be
populated in
this field.
2 astrCustomer Data with maximum size of 80 N
Name characters
19
Copyright © ICICI Bank Limited. All rights reserved.
Customer Details (required for FDMS)
Customer information is sent to the Fraud Detection system for risk verification. If
the merchant is not capturing the said details, then this object can be passed as null
to the SFA. However, if the Class is instantiated and passed to the SFA, then it is
necessary to populate the fields marked as mandatory
Sr
No Field Details Valid values Mandatory
1 strFirstName Alphabetic data with Y
maximum size of 50
characters
2 strLastName Alphabetic data with N
maximum size of 50
characters
3 OfficeAddress Object of Address Type N
4 HomeAddress Object of Address Type N
5 MobileNo Numeric data passed as N
string. Max length of 15
6 Registration Date yyyy-mm-dd Alphabetic data with N
maximum length of 10
characters
7 BillingShippingAdd Y or N Alphabetic data with Y
rMatch maximum size of 1
characters.
20
Copyright © ICICI Bank Limited. All rights reserved.
Address (for Home/Office address details)
Home and Office address details are sent to the Fraud Detection system for risk
verification. If the merchant is not capturing the Address details, then this object can
be passed as null to the SFA. However, if the Class is instantiated and passed to the
SFA, then it is necessary to populate the fields marked as mandatory
Mandator
Sr No Field Details Valid values y
1 astrAddrLine1 Alphabetic data with maximum Y
size of 50 characters
2 astrAddrLine2 Alphabetic data with maximum N
size of 50 characters
3 astrAddrLine3 Alphabetic data with maximum N
size of 50 characters
4 astrCity Alphabetic data with maximum Y
size of 30 characters
5 astrState Alphabetic data with maximum Y
size of 30 characters
6 astrZip Numeric data passed as string Y
with maximum size of 10 digits
7 astrCountryAlp Alphabetic data with maximum Y
haCode size of 3 characters IND for INDIA
8 astrEmail Alphabetic data with maximum N
size of 80 characters
21
Copyright © ICICI Bank Limited. All rights reserved.
Session Information
Session information is sent to the Fraud Detection system for risk verification. The
details have to be captured by the merchant if the merchant wishes to run the
transaction through the FDMS system. In case the merchant is not capturing the
details, then this object can be passed as null to the SFA. However, if the Class is
instantiated and passed to the SFA, then it is necessary to populate the fields
marked as mandatory
Sr
No Field Details Valid values Mandatory
1 strRemoteAddr IP Address of the Y
system from where the
end customer is
performing the
transaction.
2 strCookie The value Alphabetic data with N
stored in the maximum size of 50
cookie characters
named “vsc”
3 strBrowserCountry Alphabetic data with N
maximum size of 50
characters
4 strBroswerLanguage Alphabetic data with Y
maximum size of 16
characters
5 strBroswerLocalLangua Alphabetic data with N
geVariant maximum size of 30
characters
6 strUserAgent Alphabetic data with Y
maximum size of 30
characters
22
Copyright © ICICI Bank Limited. All rights reserved.
Merchandise Information
Merchandise information is sent to the Fraud Detection system for risk verification.
The details along with Session, customer information are used by the FDMS for risk
verification. In case the merchant is not capturing the details, then this object can be
passed as null to the SFA. However, if the Class is instantiated and passed to the
SFA, then it is necessary to populate the fields marked as mandatory. In case the
purchased goods is related to Airline ticket, then this object need not be filled in and
can be passed as null to the SFA. Instead the Airline details needs to be filled by the
merchant.
Sr
No Field Details Valid values Mandatory
1 strItemPurchased e.g., Computer,
Alphabetic data Y
Shirts, with maximum size
of 24
2 Quantity Numeric data Y
passed as string
with maximum
length of 3
3 strBrand Alphabetic data N
with maximum size
of 24 characters
4 strModelNumber Alphabetic data N
with maximum size
of 24 characters
5 strBuyer’s Name Alphabetic data N
with maximum size
of 32 characters
6 MatchingCardBuyerName Flag indicating Alphabetic data N
whether CardName with maximum size
and BuyerName of 1 characters
Matches
Y or N
23
Copyright © ICICI Bank Limited. All rights reserved.
Airline Transaction Information
Airline transaction information is sent to the Fraud Detection system for risk
verification. The details along with Session, customer information are used by the
FDMS for risk verification. In case the merchant is not capturing the details, then this
object can be passed as null to the SFA. However, if the Class is instantiated and
passed to the SFA, then it is necessary to populate the fields marked as mandatory.
In case the purchased goods is related to merchandise, then this object need not be
filled in and can be passed as null to the SFA. Instead the merchandise details needs
to be filled by the merchant.
Sr Mandat
No Field Details Valid values ory
1 strBookingDate yyyy-mm-dd Alphabetic data with maximum sizeY
of 10
2 strFlightDate yyyy-mm-dd Alphabetic data with maximum sizeY
of 10
3 strFlightTime Hh:mm (24 Alphabetic data with maximum sizeY
hr format) of 5 characters
4 strFlightNo Alphabetic data with maximum sizeY
of 12 characters
5 strPassengerName Alphabetic data with maximum sizeY
of 32 characters
6 NoOfTickets Numeric data passed as string with N
maximum length of 2 characters
7 MatchingCardBuye Flag Alphabetic data with maximum sizeN
rName indicating of 1 characters
whether
Card Name
and Buyer
Name
Matches
Y or N
Alphabetic data with maximum size
8 strPNR of 24 Y
Alphabetic data with maximum size
9 strSectorFrom of 24 Y
Alphabetic data with maximum size
10 strSectorTo of 24 Y
24
Copyright © ICICI Bank Limited. All rights reserved.
VBV Fields for a MOTO Merchant
Function Name - setMPIResponseDetails
Sr
No Field Details Valid values Mandatory
1 astrECI Numeric value Data of the size 2 Conditional
associated with characters. Mandatory
the VBV process (in case of VBV
provided by the status Y).
MPI In all other cases,
the values must be
sent if the MPI has
provided the same
2 astrXID This value is Data with maximum size Conditional
generated during of Mandatory
the VBV 28 characters (in case of VBV
validation status Y).
process In all other cases,
the values must be
sent if the MPI has
provided the same
3 astrVBVSta The result of the Data with size of 1 Y
tus VBV validations. character.
25
Copyright © ICICI Bank Limited. All rights reserved.
Sr
No Field Details Valid values Mandatory
5 The Payment Data with maximum size N
Gateway of
currently stores 256 characters
astrShoppi the value of the
ngContext Shopping
Context that is
passed to it. This
value is not
passed to the
Acquirer.
6 The Payment Data with maximum size N
Gateway of
astrPurchascurrently stores 20 characters.
eAmount the value of the
Purchase
Amount that is
passed to it. This
value is not
passed to the
Acquirer
7 astrCurrencThe Payment Data with a maximum N
yVal Gateway size of
currently stores 3 characters.
the value of the
Currency value
that is passed to
it. This value is
not passed to the
Acquirer
26
Copyright © ICICI Bank Limited. All rights reserved.
VBV Fields for a SSL Merchant
27
Copyright © ICICI Bank Limited. All rights reserved.
Sr Field Details Valid values Man
No dator
y
9 astrDeviceCategory This attribute indicates Always use value 0 Y
mode of transaction. For an
internet based transaction
the value to be set is "0".
10 astrWhatIUse This field is used by the This field can be empty and is N
MPI to denote the browser used by the MPI to denote the
version. browser version.
11 astrAcceptHdr The Accept request-head Y
er field can be used to
specify certain media types This indicates the MIME type the
which are acceptable for client can accept.
the response. Accept head
ers can be used to indicate Ex: image/gif, image/x-xbitmap,
that the request is specifi image/jpeg, image/pjpeg,
cally limited to a small set application/vnd.ms-powerpoint,
of desired types, as in the application/vnd.ms-excel,
case of a request for an in- application/msword, application/x-
line image. The server shockwave-flash, */*
property request.getHead
er("Accept") can be used
for setting this value
12 astrAgentHdr The User-Agent-header This indicates the type and Y
contains information about version of browser used by the
the user agent (typically a cardholder
newsreader) generating theEx: Mozilla/4.0 (compatible; MSIE
article, for statistical 5.5; Windows NT 5.0)
purposes and tracing of
standards violations to
specific software needing
correction. Although not
one of the mandatory
headers, posting agents
SHOULD normally include
it. The server property
request.getHeader("User-
Agent") can be used for
setting this value.
28
Copyright © ICICI Bank Limited. All rights reserved.