Project

General

Profile

Specification » History » Version 18

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