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