Project

General

Profile

Specification » History » Version 8

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

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