Specification » History » Revision 18
Revision 17 (Soh Keong, 07/12/2012 08:52 AM) → Revision 18/19 (Soh Keong, 07/12/2012 09:15 AM)
h1. Specification
h1. Activity Diagram
Figure 1 showing the process flow from Russia mall to Uniteller Payment Gateway Page.
!Uniteller_GW.png!
Figure 2 showing Uniteller send Payment status to Mall
!PaymentResult.png!
h1. Programming Guide
h2. Resources
h3. SCM
see [[wiki#SCM]]
h3. Classes
* *main.java.com.ecosway.constants* - CommonConstants, EMoneyType, Language, MeanType
* *main.java.com.ecosway.model* - Common, PaymentResponse, Personal, Uniteller
* *main.java.com.ecosway.service* - AuthorizationRequestService
* *main.java.com.ecosway.service.impl* - AuthorizationRequestServiceImpl
* *main.java.com.ecosway.unitellerInterface* - UnitellerInterface
* *main.java.com.ecosway.utils* - PropertiesUtils, SignatureUtils
* *ru.uniteller.type* - SOAPStruct_Helper, SOAPStruct
* *ru.uniteller.wsdl* - Uniteller, UnitellerLocator, UnitellerSoapBindingStub, UnitellerSoapPort, UnitellerSoapPortProxy
h3. properties file
* *application.properties*
# *shop.id* - The e-shop identifier in the Uniteller system.
# *login.id* - The login assigned to the Merchant during the account creation in the Uniteller system.
# *shop.password* - The password assigned to the Merchant during the account creation in the Uniteller system.
# *uniteller.url* - As an address of the payment page of the payment gateway.
# *uniteller.interface.table.name* - Table Name of Uniteller Interface.
# *end.point.url* - As an address of the authorization result request.
# *mean.type* - Credit Card Payment Type.
# *emoney.type* - Electronic Currency Type.
# *english* - Authorization results request param.
# *delegate.url* - JSP or servlet to delegate to Mall
h3. JSP or servlet to delegate to Mall
# put UnitellerUpdateStatus.jsp into JBOSS_DEPLOY/rustore.war/ru/
# to get order id from the jsp or servlet
<pre>
String orderId = request.getParameter("orderId");
</pre>
h3. Database Table
<pre>
CREATE TABLE ECOS.UNITELLER_INTERFACE (
ORDER_ID VARCHAR(18) NOT NULL,
CHARGE_AMT DECIMAL(15,2),
TRX_TYPE VARCHAR(20) NOT NULL,
SHOPPER_REF_NO INTEGER NOT NULL,
COMMENT VARCHAR(255),
ERROR_MESSAGE VARCHAR(255),
CURRENCY VARCHAR(3),
ORDER_STATUS VARCHAR(100),
IS_VALID CHARACTER NOT NULL,
LOCAL_DATETIME TIMESTAMP,
CREATE_DATETIME TIMESTAMP NOT NULL,
MODIFY_DATETIME TIMESTAMP,
PRIMARY KEY (ORDER_ID));
</pre>
h3. Integration
There are total 2 methods (getURL & updateStatusByOrderNo).
*Get Uniteller URL*
<pre>
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
String URL = service.getURL(Connection conn, String trxType, String orderNumber,
String currency, double amount, String urlReturn, int lifeTime,
int shopperRefNo, Language language, String comment,
main.java.com.ecosway.model.Personal personal);
</pre>
# *conn* - Database connection.
# *trxType* - The Type of Transaction.
# *orderNumber* - The unique order Number.
# *currency* - The currency of the order expressed as an ISO 4217 alpha code. (Value: main.java.com.ecosway.constants.CommonConstants.CURRENCY_)
# *amount* - The purchase amount in the currency.
# *urlReturn* - Page URL the Purchaser must be returned to when a transaction is performed in the Uniteller system.
# *lifeTime* - The form (page) lifetime in seconds, staring from the moment it was displayed.
# *shopperRefNo* - Member ID.
# *language* - The interface language code of the payment page. (Value: main.java.com.ecosway.constants.Language)
# *comment* - Payment comments.
# *personal* - firstName, lastName, middleName, email, phone, address, country, state, city and zip.
*Get Server Call Back Status*
<pre>
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
void service.updateStatusByOrderNo(Connection conn, String status, String orderNo, java.util.Date localDateTime);
</pre>
# *conn* - Database connection.
# *status* - javax.servlet.http.HttpServletRequest.getParameter("Status").
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")
# *localDateTime* - Russia payment date and time.
<pre>
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
void service.updateFromGetResultRequest(Connection conn, String orderNo, java.util.Date localDateTime);
</pre>
# *conn* - Database connection.
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")
# *localDateTime* - Russia payment date and time.