Project

General

Profile

Specification » History » Version 6

Soh Keong, 06/19/2012 05:29 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
Figure 2 showing the process flow to get Payment Result from Uniteller Payment Gateway.
9
!PaymentResult.png!
10
11
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
* *ru.uniteller.wsd*l                        - 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
   # *end.point.url* - Payment Result end point URL.
40
41
h3. Database Table
42
43
<pre>
44
CREATE TABLE ECOS.UNITELLER_INTERFACE (
45
	ORDER_ID VARCHAR(100) NOT NULL, 
46
	CHARGE_AMT DECIMAL(15,2), 
47
	TRX_TYPE VARCHAR(20), 
48
	SHOPPER_REF_NO INTEGER, 
49
	COMMENT VARCHAR(255),
50
	RESPONSE_CODE VARCHAR(5),
51
	RESPONSE_MSG VARCHAR(120),
52
	ERROR_MESSAGE VARCHAR(255),
53
	CURRENCY VARCHAR(3),
54
	CARD_TYPE VARCHAR(15),
55
	UNI_BILL_NUMBER VARCHAR(100),
56
	ORDER_STATUS VARCHAR(100),
57
	ERROR_CODE VARCHAR(100),
58
	ERROR_COMMENT VARCHAR(100),
59
	IS_VALID CHARACTER, 
60
	DATETIME TIMESTAMP,
61
	MODIFY_DATETIME TIMESTAMP, 
62
	PRIMARY KEY (ORDER_ID));
63
</pre>
64
65
h3. Integration
66
67 6 Soh Keong
There are total 3 methods (getURL, getPaymentResultList & updateStatusByOrderNo).
68
69 3 Soh Keong
*Get Uniteller URL*
70
71
<pre>
72
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
73
74
String URL = service.getURL(Connection conn, String trxType, String orderNumber,
75
			double amount, String urlReturn, int lifeTime, int shopperRefNo,
76
			MeanType meanType, EMoneyType eMoneyType, Language language,
77
			String comment, main.java.com.ecosway.model.Personal personal);
78
</pre>
79
80
# *conn*            - Database connection.
81
# *trxType*         - The Type of Transaction.
82
# *orderNumber*     - The unique order Number.
83
# *amount*          - The purchase amount in the currency.
84
# *urlReturn*       - Page URL the Purchaser must be returned to when a transaction is performed in the Uniteller system.
85
# *lifeTime*        - The form (page) lifetime in seconds, staring from the moment it was displayed.
86
# *shopperRefNo*    - Member ID.
87
# *meanType*        - The credit card payment system. (Value: main.java.com.ecosway.constants.MeanType)
88
# *eMoneyType*      - The type of electronic currency type. (Value: main.java.com.ecosway.constants.EMoneyType)
89
# *language*        - The interface language code of the payment page. (Value: main.java.com.ecosway.constants.Language)
90 5 Soh Keong
# *comment*         - Payment comments.
91 3 Soh Keong
# *personal*        - firstName, lastName, middleName, email, phone, address, country, state, city and zip.
92 4 Soh Keong
93
*Get Payment Response*
94
95
<pre>
96
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
97
98
List<PaymentResponse> paymentResponseList = service.getPaymentResultList(Connection conn,
99
			String orderNumber, String success, MeanType meanType,
100
			EMoneyType eMoneyType, String english);
101
</pre>
102
103
# *conn*            - Database connection.
104
# *orderNumber*     - The unique order Number.
105
# *success*         - The operations to be included to the response.(0 – unsuccessful, 1 – successful, 2 – all)
106
# *meanType*        - The credit card payment system. (Value: main.java.com.ecosway.constants.MeanType)
107
# *eMoneyType*      - The type of electronic currency type. (Value: main.java.com.ecosway.constants.EMoneyType)
108
# *english*         - 
109 6 Soh Keong
110
*Get Server Call Back Status*
111
112
<pre>
113
main.java.com.ecosway.service.AuthorizationRequestService service = new main.java.com.ecosway.service.impl.AuthorizationRequestServiceImpl();
114
115
void service.updateStatusByOrderNo(Connection conn, String status, String orderNo);
116
</pre>
117
118
# *conn*    - Database connection.
119
# *status*  - javax.servlet.http.HttpServletRequest.getParameter("Status").
120
# *orderNo* - javax.servlet.http.HttpServletRequest.getParameter("Order_ID")