Project

General

Profile

Specification » History » Version 15

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