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