Project

General

Profile

Specification » History » Version 2

Soh Keong, 06/29/2022 09:37 AM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Activity Diagram
6
7
!PinBase.png!
8
!PinLess.png!
9
10
h1. Programming Guide
11
12
h2. Jar version 
13
14
|_. version |_. Description                          |
15
| 1.11      | Init                                   |
16
17
18
19
h2. Jar File Download
20
21
"Jar":
22
"Properties":
23
24
h3. Classes
25
26
* *com.cosway.razer.bean*    - MobileInitRequestBean, MobileInitResponseBean, MobileConfirmRequestBean, MobileConfirmResponseBean, StockBean
27
* *com.cosway.razer.common*  - CommonConstant, CommonProperties, ResponseCode
28
* *com.cosway.razer.dao*     - RazerInterface
29
* *com.cosway.razer.service* - MobileService
30
* *com.cosway.razer.util*    - HttpManager, MyUtil
31
32
h3. properties file
33
34
* *razer.properties*
35
36
# *razer.url*            - 
37
# *authetication.scheme* - 
38
# *terminal.code*        - 
39
# *secret.key*           - 
40
# *iv.key*               - 
41
# *CONNECTION_TIMEOUT*   - 
42
# *READ_TIMEOUT*         - 
43
44
45
h2. Database Table
46
47
<pre>
48
CREATE TABLE RAZER_INTERFACE (
49
	ORDER_ID VARCHAR(15) NOT NULL, 
50
	SHOPPER_REF_NO INTEGER,
51
	CURRENCY VARCHAR(3),
52
	TEMPLATE VARCHAR(20),
53
	PRODUCT_CODE VARCHAR(20),
54
	CHARGE_AMT DECIMAL(15,2), 
55
	QUANTITY INTEGER,
56
	ORDER_ID_RAZER VARCHAR(25),
57
	RES_CODE VARCHAR(20),
58
	RES_MESSAGE VARCHAR(100),
59
	IS_VALID CHARACTER NOT NULL DEFAULT 'N', 
60
	CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
61
	MODIFY_DATETIME TIMESTAMP, 
62
	PRIMARY KEY (ORDER_ID))
63
64
CREATE TABLE RAZER_BILL_INTERFACE (
65
	ORDER_ID VARCHAR(15) NOT NULL, 
66
	BILL_REFERENCE_1 VARCHAR(20),
67
	BILL_REFERENCE_2 VARCHAR(50),
68
	BILL_REFERENCE_3 VARCHAR(50),
69
	BILL_REFERENCE_4 VARCHAR(20),
70
	BILL_REFERENCE_5 VARCHAR(20),
71
	LATEST VARCHAR(1),	
72
	PRIMARY KEY (ORDER_ID))
73
74
CREATE INDEX UI_LATEST ON RAZER_BILL_INTERFACE(LATEST)
75
76
CREATE TABLE RAZER_STOCK_INTERFACE (
77
	ORDER_ID VARCHAR(15) NOT NULL, 
78
	SERIAL_NO_1 VARCHAR(20),
79
	SERIAL_NO_2 VARCHAR(20),
80
	SERIAL_NO_3 VARCHAR(20),
81
	SERIAL_NO_4 VARCHAR(20),
82
	SERIAL_NO_5 VARCHAR(20),
83
	PIN_1 VARCHAR(30),
84
	PIN_2 VARCHAR(30),
85
	PIN_3 VARCHAR(30),
86
	PIN_4 VARCHAR(30),
87
	PIN_5 VARCHAR(30),
88
	EXPIRY_DATE_1 DATE,
89
	EXPIRY_DATE_2 DATE,
90
	EXPIRY_DATE_3 DATE,
91
	EXPIRY_DATE_4 DATE,
92
	EXPIRY_DATE_5 DATE,
93
	PRIMARY KEY (ORDER_ID))
94
</pre>
95
96
97
h2. Mobile Service
98
99
<pre>
100
com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();
101
</pre>
102
103
h3. mobileInit
104
105
<pre>
106
com.cosway.razer.bean.MobileInitResponseBean responseBean = service.mobileInit(Connection conn, MobileInitRequestBean bean);
107
</pre>
108
109
# *conn*           - Database connection.
110
# *bean*           - MobileInitRequestBean  object.
111
> * *orderId*      - 
112
> * *ShopperRefNo* - 
113
> * *Currency*     - 
114
> * *ProductCode*  - 
115
> * *Quantity*     - 
116
> * *Template*     - 
117
118
# *responseBean*   - MobileInitResponseBean object.
119
> * *responseCode* - 
120
> * *httpMessage*  - 
121
> * *orderId*      - 
122
> * *amount*       - 
123
> * *token*        - 
124
125
h3. mobileConfirm / mobileQuery
126
127
<pre>
128 2 Soh Keong
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileConfirm(Connection conn, String orderId);
129 1 Soh Keong
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileQuery(Connection conn, String orderId);
130
</pre>
131
132
# *conn*           - Database connection.
133
134
# *responseBean*     - MobileConfirmResponseBean object.
135
> * *responseCode*   - 
136
> * *httpMessage*    - 
137
> * *orderId*        - 
138
> * *walletBalance*  - Only applicable in 'mobileConfirm'
139
> * *instruction*    -
140
> * *mobileBeanList* - StockMobileBean Array
141
>> * *serialNo*   -  
142
>> * *pin*        - 
143
>> * *expiryDate* - Date