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