Project

General

Profile

Specification » History » Version 15

Soh Keong, 07/11/2012 05:40 PM

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 12 Soh Keong
   # *mean.type* - Credit Card Payment Type.
40
   # *emoney.type* - Electronic Currency Type.
41 3 Soh Keong
42 1 Soh Keong
h3. Database Table
43 3 Soh Keong
44
<pre>
45
CREATE TABLE ECOS.UNITELLER_INTERFACE (
46 8 Soh Keong
	ORDER_ID VARCHAR(18) NOT NULL, 
47 3 Soh Keong
	CHARGE_AMT DECIMAL(15,2), 
48 10 Soh Keong
	TRX_TYPE VARCHAR(20) NOT NULL, 
49
	SHOPPER_REF_NO INTEGER NOT NULL, 
50 3 Soh Keong
	COMMENT VARCHAR(255),
51 8 Soh Keong
	ERROR_MESSAGE VARCHAR(255), 
52 3 Soh Keong
	CURRENCY VARCHAR(3),
53
	ORDER_STATUS VARCHAR(100),
54 10 Soh Keong
	IS_VALID CHARACTER NOT NULL, 
55 9 Soh Keong
	LOCAL_DATETIME TIMESTAMP,
56 11 Soh Keong
	CREATE_DATETIME TIMESTAMP NOT NULL,
57 1 Soh Keong
	MODIFY_DATETIME TIMESTAMP, 
58 10 Soh Keong
	PRIMARY KEY (ORDER_ID));
59 1 Soh Keong
</pre>
60
61 3 Soh Keong
h3. Integration
62
63 8 Soh Keong
There are total 2 methods (getURL & updateStatusByOrderNo).
64 3 Soh Keong
65
*Get Uniteller URL*
66 1 Soh Keong
67 6 Soh Keong
<pre>
68 3 Soh Keong
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
69 1 Soh Keong
70
String URL = service.getURL(Connection conn, String trxType, String orderNumber,
71 12 Soh Keong
			String currency, double amount, String urlReturn, int lifeTime,
72
			int shopperRefNo, Language language, String comment,
73
			main.java.com.ecosway.model.Personal personal);
74 3 Soh Keong
</pre>
75
76
# *conn*            - Database connection.
77
# *trxType*         - The Type of Transaction.
78
# *orderNumber*     - The unique order Number.
79
# *currency*        - The currency of the order expressed as an ISO 4217 alpha code. (Value: main.java.com.ecosway.constants.CommonConstants.CURRENCY_)
80 4 Soh Keong
# *amount*          - The purchase amount in the currency.
81
# *urlReturn*       - Page URL the Purchaser must be returned to when a transaction is performed in the Uniteller system.
82
# *lifeTime*        - The form (page) lifetime in seconds, staring from the moment it was displayed.
83
# *shopperRefNo*    - Member ID.
84
# *language*        - The interface language code of the payment page. (Value: main.java.com.ecosway.constants.Language)
85
# *comment*         - Payment comments.
86
# *personal*        - firstName, lastName, middleName, email, phone, address, country, state, city and zip.
87 6 Soh Keong
88
*Get Server Call Back Status*
89
90
<pre>
91 1 Soh Keong
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
92 6 Soh Keong
93 9 Soh Keong
void service.updateStatusByOrderNo(Connection conn, String status, String orderNo, java.util.Date localDateTime);
94 6 Soh Keong
</pre>
95
96
# *conn*    - Database connection.
97 1 Soh Keong
# *status*  - javax.servlet.http.HttpServletRequest.getParameter("Status").
98 6 Soh Keong
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")
99 9 Soh Keong
# *localDateTime* - Russia payment date and time.
100 13 Soh Keong
101 14 Soh Keong
<pre>
102
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
103
104 13 Soh Keong
void service.updateFromGetResultRequest(Connection conn, String orderNo, java.util.Date localDateTime);
105
</pre>
106
107
# *conn*    - Database connection.
108
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")
109
# *localDateTime* - Russia payment date and time.