Project

General

Profile

Specification » History » Version 10

Soh Keong, 07/14/2022 11:06 AM

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