Project

General

Profile

Specification » History » Version 5

Soh Keong, 06/29/2022 04:49 PM

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 3 Soh Keong
"Jar":/redmine/attachments/download/661/razerBill-1.0.jar
22
"Properties":/redmine/attachments/download/662/razer.properties
23
"lib"/redmine/attachments/download/660/lib.zip
24 1 Soh Keong
25
h3. Classes
26
27
* *com.cosway.razer.bean*    - MobileInitRequestBean, MobileInitResponseBean, MobileConfirmRequestBean, MobileConfirmResponseBean, StockBean
28
* *com.cosway.razer.common*  - CommonConstant, CommonProperties, ResponseCode
29
* *com.cosway.razer.dao*     - RazerInterface
30
* *com.cosway.razer.service* - MobileService
31
* *com.cosway.razer.util*    - HttpManager, MyUtil
32
33
h3. properties file
34
35
* *razer.properties*
36
37
# *razer.url*            - 
38
# *authetication.scheme* - 
39
# *terminal.code*        - 
40
# *secret.key*           - 
41
# *iv.key*               - 
42
# *CONNECTION_TIMEOUT*   - 
43
# *READ_TIMEOUT*         - 
44
45
46
h2. Database Table
47
48
<pre>
49
CREATE TABLE RAZER_INTERFACE (
50
	ORDER_ID VARCHAR(15) NOT NULL, 
51
	SHOPPER_REF_NO INTEGER,
52
	CURRENCY VARCHAR(3),
53
	TEMPLATE VARCHAR(20),
54
	PRODUCT_CODE VARCHAR(20),
55
	CHARGE_AMT DECIMAL(15,2), 
56
	QUANTITY INTEGER,
57
	ORDER_ID_RAZER VARCHAR(25),
58
	RES_CODE VARCHAR(20),
59
	RES_MESSAGE VARCHAR(100),
60
	IS_VALID CHARACTER NOT NULL DEFAULT 'N', 
61
	CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
62
	MODIFY_DATETIME TIMESTAMP, 
63
	PRIMARY KEY (ORDER_ID))
64
65
CREATE TABLE RAZER_BILL_INTERFACE (
66
	ORDER_ID VARCHAR(15) NOT NULL, 
67
	BILL_REFERENCE_1 VARCHAR(20),
68
	BILL_REFERENCE_2 VARCHAR(50),
69
	BILL_REFERENCE_3 VARCHAR(50),
70
	BILL_REFERENCE_4 VARCHAR(20),
71
	BILL_REFERENCE_5 VARCHAR(20),
72
	LATEST VARCHAR(1),	
73
	PRIMARY KEY (ORDER_ID))
74
75
CREATE INDEX UI_LATEST ON RAZER_BILL_INTERFACE(LATEST)
76
77
CREATE TABLE RAZER_STOCK_INTERFACE (
78
	ORDER_ID VARCHAR(15) NOT NULL, 
79
	SERIAL_NO_1 VARCHAR(20),
80
	SERIAL_NO_2 VARCHAR(20),
81
	SERIAL_NO_3 VARCHAR(20),
82
	SERIAL_NO_4 VARCHAR(20),
83
	SERIAL_NO_5 VARCHAR(20),
84
	PIN_1 VARCHAR(30),
85
	PIN_2 VARCHAR(30),
86
	PIN_3 VARCHAR(30),
87
	PIN_4 VARCHAR(30),
88
	PIN_5 VARCHAR(30),
89
	EXPIRY_DATE_1 DATE,
90
	EXPIRY_DATE_2 DATE,
91
	EXPIRY_DATE_3 DATE,
92
	EXPIRY_DATE_4 DATE,
93
	EXPIRY_DATE_5 DATE,
94
	PRIMARY KEY (ORDER_ID))
95
</pre>
96
97
98 4 Soh Keong
h2. Mobile Service (Pin Base)
99 1 Soh Keong
100
<pre>
101
com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();
102
</pre>
103
104
h3. mobileInit
105
106
<pre>
107
com.cosway.razer.bean.MobileInitResponseBean responseBean = service.mobileInit(Connection conn, MobileInitRequestBean bean);
108
</pre>
109
110
# *conn*           - Database connection.
111
# *bean*           - MobileInitRequestBean  object.
112
> * *orderId*      - 
113
> * *ShopperRefNo* - 
114
> * *Currency*     - 
115
> * *ProductCode*  - 
116
> * *Quantity*     - 
117
> * *Template*     - 
118
119
# *responseBean*   - MobileInitResponseBean object.
120
> * *responseCode* - 
121
> * *httpMessage*  - 
122
> * *orderId*      - 
123
> * *amount*       - 
124
> * *token*        - 
125
126
h3. mobileConfirm / mobileQuery
127
128
<pre>
129 2 Soh Keong
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileConfirm(Connection conn, String orderId);
130 1 Soh Keong
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileQuery(Connection conn, String orderId);
131
</pre>
132
133
# *conn*           - Database connection.
134
135
# *responseBean*     - MobileConfirmResponseBean object.
136
> * *responseCode*   - 
137
> * *httpMessage*    - 
138
> * *orderId*        - 
139 4 Soh Keong
> * *orderIdRazer*   - 
140 1 Soh Keong
> * *walletBalance*  - Only applicable in 'mobileConfirm'
141
> * *instruction*    -
142
> * *mobileBeanList* - StockMobileBean Array
143
>> * *serialNo*   -  
144
>> * *pin*        - 
145
>> * *expiryDate* - Date
146 4 Soh Keong
147
148
h2. Mobile Service (Direct Topup)
149
150
<pre>
151
com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();
152
</pre>
153
154 5 Soh Keong
h3. topupWithMobileNo / topupQueryByOrderId
155 4 Soh Keong
156
<pre>
157
com.cosway.razer.bean.TopupResponseBean responseBean = service.topupWithMobileNo(Connection conn, TopupRequestBean bean);
158
com.cosway.razer.bean.TopupResponseBean responseBean = service.topupQueryByOrderId(Connection conn, String orderId);
159
</pre>
160
161
# *conn*           - Database connection.
162
# *bean*           - TopupRequestBean object.
163
> * *orderId*      - 
164
> * *ShopperRefNo* - 
165
> * *Currency*     - 
166
> * *ProductCode*  - 
167
> * *Template*     -
168
> * *CountryCode*  - 
169
> * *MobileNumber* - 
170
171
# *responseBean*     - TopupResponseBean object.
172
> * *responseCode*   - 
173
> * *httpMessage*    - 
174
> * *orderId*        - 
175
> * *orderIdRazer*   - 
176
> * *walletBalance*  - Only applicable in 'mobileConfirm'
177
> * *instruction*    -