Specification » History » Revision 14
Revision 13 (Soh Keong, 07/21/2022 11:36 AM) → Revision 14/19 (Soh Keong, 07/27/2022 03:32 PM)
{{toc}}
h1. Specification
h1. Activity Diagram
h2. Pin Base
!PinBase.png!
h2. Direct Topup
!PinLess.png!
h1. Programming Guide
h2. Jar version
|_. version |_. Description |
| 1.0 | Init |
| 1.1 | Added return shopper Ref No |
| 1.2 | PinBase-Init's success message update to 'PendingConfirmation' |
h2. Jar File Download
"Jar":/redmine/attachments/download/670/razerBill-1.2.jar
"Properties":/redmine/attachments/download/662/razer.properties
"lib":/redmine/attachments/download/660/lib.zip
h3. Classes
* *com.cosway.razer.bean* - MobileInitRequestBean, MobileInitResponseBean, MobileConfirmRequestBean, MobileConfirmResponseBean, StockBean
* *com.cosway.razer.common* - CommonConstant, CommonProperties, ResponseCode
* *com.cosway.razer.dao* - RazerInterface
* *com.cosway.razer.service* - MobileService
* *com.cosway.razer.util* - HttpManager, MyUtil
h3. properties file
* *razer.properties*
# *razer.url* -
# *authetication.scheme* -
# *terminal.code* -
# *secret.key* -
# *iv.key* -
# *CONNECTION_TIMEOUT* -
# *READ_TIMEOUT* -
h2. Database Table
<pre>
CREATE TABLE RAZER_INTERFACE (
ORDER_ID VARCHAR(15) NOT NULL,
SHOPPER_REF_NO INTEGER,
CURRENCY VARCHAR(3),
TEMPLATE VARCHAR(20),
PRODUCT_CODE VARCHAR(20),
CHARGE_AMT DECIMAL(15,2),
QUANTITY INTEGER,
ORDER_ID_RAZER VARCHAR(25),
RES_CODE VARCHAR(20),
RES_MESSAGE VARCHAR(100),
IS_VALID CHARACTER NOT NULL DEFAULT 'N',
CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
MODIFY_DATETIME TIMESTAMP,
PRIMARY KEY (ORDER_ID))
CREATE TABLE RAZER_BILL_INTERFACE (
ORDER_ID VARCHAR(15) NOT NULL,
BILL_REFERENCE_1 VARCHAR(20),
BILL_REFERENCE_2 VARCHAR(50),
BILL_REFERENCE_3 VARCHAR(50),
BILL_REFERENCE_4 VARCHAR(20),
BILL_REFERENCE_5 VARCHAR(20),
LATEST VARCHAR(1),
PRIMARY KEY (ORDER_ID))
CREATE INDEX UI_LATEST ON RAZER_BILL_INTERFACE(LATEST)
CREATE TABLE RAZER_STOCK_INTERFACE (
ORDER_ID VARCHAR(15) NOT NULL,
SERIAL_NO_1 VARCHAR(20),
SERIAL_NO_2 VARCHAR(20),
SERIAL_NO_3 VARCHAR(20),
SERIAL_NO_4 VARCHAR(20),
SERIAL_NO_5 VARCHAR(20),
PIN_1 VARCHAR(30),
PIN_2 VARCHAR(30),
PIN_3 VARCHAR(30),
PIN_4 VARCHAR(30),
PIN_5 VARCHAR(30),
EXPIRY_DATE_1 DATE,
EXPIRY_DATE_2 DATE,
EXPIRY_DATE_3 DATE,
EXPIRY_DATE_4 DATE,
EXPIRY_DATE_5 DATE,
PRIMARY KEY (ORDER_ID))
</pre>
h2. Mobile Service (Pin Base)
<pre>
com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();
</pre>
h3. mobileInit
<pre>
com.cosway.razer.bean.MobileInitResponseBean responseBean = service.mobileInit(Connection conn, MobileInitRequestBean bean);
</pre>
# *conn* - Database connection.
# *bean* - MobileInitRequestBean object.
> * *orderId* -
> * *ShopperRefNo* -
> * *Currency* -
> * *ProductCode* -
> * *Quantity* -
> * *Template* -
# *responseBean* - MobileInitResponseBean object.
> * *responseCode* -
> * *httpMessage* -
> * *orderId* -
> * *amount* -
> * *token* -
h3. mobileConfirm / mobileQuery
<pre>
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileConfirm(Connection conn, String orderId);
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileQuery(Connection conn, String orderId);
</pre>
# *conn* - Database connection.
# *responseBean* - MobileConfirmResponseBean object.
> * *responseCode* -
> * *httpMessage* -
> * *orderId* -
> * *orderIdRazer* -
> * *walletBalance* - Only applicable in 'mobileConfirm'
> * *instruction* -
> * *mobileBeanList* - StockMobileBean Array
>> * *serialNo* -
>> * *pin* -
>> * *expiryDate* - Date
h2. Mobile Service (Direct Topup)
<pre>
com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();
</pre>
h3. topupWithMobileNo / topupQueryByOrderId
<pre>
com.cosway.razer.bean.TopupResponseBean responseBean = service.topupWithMobileNo(Connection conn, TopupRequestBean bean);
com.cosway.razer.bean.TopupResponseBean responseBean = service.topupQueryByOrderId(Connection conn, String orderId);
</pre>
# *conn* - Database connection.
# *bean* - TopupRequestBean object.
> * *orderId* -
> * *ShopperRefNo* -
> * *Currency* -
> * *ProductCode* -
> * *Template* -
> * *CountryCode* -
> * *MobileNumber* -
# *responseBean* - TopupResponseBean object.
> * *responseCode* -
> * *httpMessage* -
> * *orderId* -
> * *orderIdRazer* -
> * *walletBalance* - Only applicable in 'mobileConfirm'
> * *instruction* -