Specification » History » Version 12
Soh Keong, 07/21/2022 11:30 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 | 1 | Soh Keong | |
24 | |||
25 | 10 | Soh Keong | |
26 | 1 | Soh Keong | h2. Jar File Download |
27 | |||
28 | 12 | Soh Keong | "Jar":/redmine/attachments/download/669/razerBill-1.2.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 | CREATE TABLE RAZER_STOCK_INTERFACE ( |
||
85 | ORDER_ID VARCHAR(15) NOT NULL, |
||
86 | SERIAL_NO_1 VARCHAR(20), |
||
87 | SERIAL_NO_2 VARCHAR(20), |
||
88 | SERIAL_NO_3 VARCHAR(20), |
||
89 | SERIAL_NO_4 VARCHAR(20), |
||
90 | SERIAL_NO_5 VARCHAR(20), |
||
91 | PIN_1 VARCHAR(30), |
||
92 | PIN_2 VARCHAR(30), |
||
93 | PIN_3 VARCHAR(30), |
||
94 | PIN_4 VARCHAR(30), |
||
95 | PIN_5 VARCHAR(30), |
||
96 | EXPIRY_DATE_1 DATE, |
||
97 | EXPIRY_DATE_2 DATE, |
||
98 | EXPIRY_DATE_3 DATE, |
||
99 | EXPIRY_DATE_4 DATE, |
||
100 | EXPIRY_DATE_5 DATE, |
||
101 | PRIMARY KEY (ORDER_ID)) |
||
102 | </pre> |
||
103 | |||
104 | |||
105 | 4 | Soh Keong | h2. Mobile Service (Pin Base) |
106 | 1 | Soh Keong | |
107 | <pre> |
||
108 | com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService(); |
||
109 | </pre> |
||
110 | |||
111 | h3. mobileInit |
||
112 | |||
113 | <pre> |
||
114 | com.cosway.razer.bean.MobileInitResponseBean responseBean = service.mobileInit(Connection conn, MobileInitRequestBean bean); |
||
115 | </pre> |
||
116 | |||
117 | # *conn* - Database connection. |
||
118 | # *bean* - MobileInitRequestBean object. |
||
119 | > * *orderId* - |
||
120 | > * *ShopperRefNo* - |
||
121 | > * *Currency* - |
||
122 | > * *ProductCode* - |
||
123 | > * *Quantity* - |
||
124 | > * *Template* - |
||
125 | |||
126 | # *responseBean* - MobileInitResponseBean object. |
||
127 | > * *responseCode* - |
||
128 | > * *httpMessage* - |
||
129 | > * *orderId* - |
||
130 | > * *amount* - |
||
131 | > * *token* - |
||
132 | |||
133 | h3. mobileConfirm / mobileQuery |
||
134 | |||
135 | <pre> |
||
136 | 2 | Soh Keong | com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileConfirm(Connection conn, String orderId); |
137 | 1 | Soh Keong | com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileQuery(Connection conn, String orderId); |
138 | </pre> |
||
139 | |||
140 | # *conn* - Database connection. |
||
141 | |||
142 | # *responseBean* - MobileConfirmResponseBean object. |
||
143 | > * *responseCode* - |
||
144 | > * *httpMessage* - |
||
145 | > * *orderId* - |
||
146 | 4 | Soh Keong | > * *orderIdRazer* - |
147 | 1 | Soh Keong | > * *walletBalance* - Only applicable in 'mobileConfirm' |
148 | > * *instruction* - |
||
149 | > * *mobileBeanList* - StockMobileBean Array |
||
150 | >> * *serialNo* - |
||
151 | >> * *pin* - |
||
152 | >> * *expiryDate* - Date |
||
153 | 4 | Soh Keong | |
154 | |||
155 | h2. Mobile Service (Direct Topup) |
||
156 | |||
157 | <pre> |
||
158 | com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService(); |
||
159 | </pre> |
||
160 | |||
161 | 5 | Soh Keong | h3. topupWithMobileNo / topupQueryByOrderId |
162 | 4 | Soh Keong | |
163 | <pre> |
||
164 | com.cosway.razer.bean.TopupResponseBean responseBean = service.topupWithMobileNo(Connection conn, TopupRequestBean bean); |
||
165 | com.cosway.razer.bean.TopupResponseBean responseBean = service.topupQueryByOrderId(Connection conn, String orderId); |
||
166 | </pre> |
||
167 | |||
168 | # *conn* - Database connection. |
||
169 | # *bean* - TopupRequestBean object. |
||
170 | > * *orderId* - |
||
171 | > * *ShopperRefNo* - |
||
172 | > * *Currency* - |
||
173 | > * *ProductCode* - |
||
174 | > * *Template* - |
||
175 | > * *CountryCode* - |
||
176 | > * *MobileNumber* - |
||
177 | |||
178 | # *responseBean* - TopupResponseBean object. |
||
179 | > * *responseCode* - |
||
180 | > * *httpMessage* - |
||
181 | > * *orderId* - |
||
182 | > * *orderIdRazer* - |
||
183 | > * *walletBalance* - Only applicable in 'mobileConfirm' |
||
184 | > * *instruction* - |