Project

General

Profile

Specification » History » Version 18

Soh Keong, 07/12/2012 09:15 AM

1 1 Soh Keong
h1. Specification
2 2 Soh Keong
3
h1. Activity Diagram
4
5
Figure 1 showing the process flow from Russia mall to Uniteller Payment Gateway Page.
6
!Uniteller_GW.png!
7
8 15 Soh Keong
Figure 2 showing Uniteller send Payment status to Mall
9
!PaymentResult.png!
10
11 2 Soh Keong
h1. Programming Guide
12
13
h2. Resources
14
15
h3. SCM
16
17
see [[wiki#SCM]]
18
19
h3. Classes
20
21
* *main.java.com.ecosway.constants*          - CommonConstants, EMoneyType, Language, MeanType
22
* *main.java.com.ecosway.model*              - Common, PaymentResponse, Personal, Uniteller
23
* *main.java.com.ecosway.service*            - AuthorizationRequestService
24
* *main.java.com.ecosway.service.impl*       - AuthorizationRequestServiceImpl
25
* *main.java.com.ecosway.unitellerInterface* - UnitellerInterface
26
* *main.java.com.ecosway.utils*              - PropertiesUtils, SignatureUtils
27
* *ru.uniteller.type*                        - SOAPStruct_Helper, SOAPStruct
28 7 Soh Keong
* *ru.uniteller.wsdl*                        - Uniteller, UnitellerLocator, UnitellerSoapBindingStub, UnitellerSoapPort, UnitellerSoapPortProxy
29 3 Soh Keong
30
h3. properties file
31
32
* *application.properties*
33
34
   # *shop.id*       - The e-shop identifier in the Uniteller system.
35
   # *login.id*      - The login assigned to the Merchant during the account creation in the Uniteller system.
36
   # *shop.password* - The password assigned to the Merchant during the account creation in the Uniteller system.
37
   # *uniteller.url* - As an address of the payment page of the payment gateway.
38
   # *uniteller.interface.table.name* - Table Name of Uniteller Interface.
39 16 Soh Keong
   # *end.point.url* - As an address of the authorization result request.
40
   # *mean.type*     - Credit Card Payment Type.
41
   # *emoney.type*   - Electronic Currency Type.
42
   # *english*       - Authorization results request param.
43 17 Soh Keong
   # *delegate.url*  - JSP or servlet to delegate to Mall
44 3 Soh Keong
45 18 Soh Keong
h3. JSP or servlet to delegate to Mall
46
47
# put UnitellerUpdateStatus.jsp into JBOSS_DEPLOY/rustore.war/ru/
48
# to get order id from the jsp or servlet 
49
<pre>
50
 String orderId = request.getParameter("orderId");
51
</pre>
52
53 1 Soh Keong
h3. Database Table
54 3 Soh Keong
55
<pre>
56
CREATE TABLE ECOS.UNITELLER_INTERFACE (
57 8 Soh Keong
	ORDER_ID VARCHAR(18) NOT NULL, 
58 3 Soh Keong
	CHARGE_AMT DECIMAL(15,2), 
59 10 Soh Keong
	TRX_TYPE VARCHAR(20) NOT NULL, 
60
	SHOPPER_REF_NO INTEGER NOT NULL, 
61 3 Soh Keong
	COMMENT VARCHAR(255),
62 8 Soh Keong
	ERROR_MESSAGE VARCHAR(255), 
63 3 Soh Keong
	CURRENCY VARCHAR(3),
64
	ORDER_STATUS VARCHAR(100),
65 10 Soh Keong
	IS_VALID CHARACTER NOT NULL, 
66 9 Soh Keong
	LOCAL_DATETIME TIMESTAMP,
67 11 Soh Keong
	CREATE_DATETIME TIMESTAMP NOT NULL,
68 1 Soh Keong
	MODIFY_DATETIME TIMESTAMP, 
69 10 Soh Keong
	PRIMARY KEY (ORDER_ID));
70 1 Soh Keong
</pre>
71
72 3 Soh Keong
h3. Integration
73
74 8 Soh Keong
There are total 2 methods (getURL & updateStatusByOrderNo).
75 3 Soh Keong
76
*Get Uniteller URL*
77 1 Soh Keong
78 6 Soh Keong
<pre>
79 3 Soh Keong
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
80 1 Soh Keong
81
String URL = service.getURL(Connection conn, String trxType, String orderNumber,
82 12 Soh Keong
			String currency, double amount, String urlReturn, int lifeTime,
83
			int shopperRefNo, Language language, String comment,
84
			main.java.com.ecosway.model.Personal personal);
85 3 Soh Keong
</pre>
86
87
# *conn*            - Database connection.
88
# *trxType*         - The Type of Transaction.
89
# *orderNumber*     - The unique order Number.
90
# *currency*        - The currency of the order expressed as an ISO 4217 alpha code. (Value: main.java.com.ecosway.constants.CommonConstants.CURRENCY_)
91 4 Soh Keong
# *amount*          - The purchase amount in the currency.
92
# *urlReturn*       - Page URL the Purchaser must be returned to when a transaction is performed in the Uniteller system.
93
# *lifeTime*        - The form (page) lifetime in seconds, staring from the moment it was displayed.
94
# *shopperRefNo*    - Member ID.
95
# *language*        - The interface language code of the payment page. (Value: main.java.com.ecosway.constants.Language)
96
# *comment*         - Payment comments.
97
# *personal*        - firstName, lastName, middleName, email, phone, address, country, state, city and zip.
98 6 Soh Keong
99
*Get Server Call Back Status*
100
101
<pre>
102 1 Soh Keong
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
103 6 Soh Keong
104 9 Soh Keong
void service.updateStatusByOrderNo(Connection conn, String status, String orderNo, java.util.Date localDateTime);
105 6 Soh Keong
</pre>
106
107
# *conn*    - Database connection.
108 1 Soh Keong
# *status*  - javax.servlet.http.HttpServletRequest.getParameter("Status").
109 6 Soh Keong
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")
110 9 Soh Keong
# *localDateTime* - Russia payment date and time.
111 13 Soh Keong
112 14 Soh Keong
<pre>
113
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
114
115 13 Soh Keong
void service.updateFromGetResultRequest(Connection conn, String orderNo, java.util.Date localDateTime);
116
</pre>
117
118
# *conn*    - Database connection.
119
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")
120
# *localDateTime* - Russia payment date and time.