Project

General

Profile

Actions

Specification

Activity Diagram

Pin Base

Direct Topup

Programming Guide

Jar version

version Description
1.0 Init
1.1 Added return shopper Ref No
1.2 PinBase-Init's success message update to 'PendingConfirmation'
1.3 Replace Exception with errorCode
1.4 Added Direct top up interval checking
1.5 Added interval checking on same product for same number.

Jar File Download

Jar
Properties
lib

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

properties file

  • razer.properties
  1. razer.url -
  2. authetication.scheme -
  3. terminal.code -
  4. secret.key -
  5. iv.key -
  6. CONNECTION_TIMEOUT -
  7. READ_TIMEOUT -

Database Table

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)

Mobile Service (Pin Base)

com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();

mobileInit

com.cosway.razer.bean.MobileInitResponseBean responseBean = service.mobileInit(Connection conn, MobileInitRequestBean bean);
  1. conn - Database connection.
  2. bean - MobileInitRequestBean object.
  • orderId -
  • ShopperRefNo -
  • Currency -
  • ProductCode -
  • Quantity -
  • Template -
  1. responseBean - MobileInitResponseBean object.
  • responseCode -
  • httpMessage -
  • orderId -
  • amount -
  • token -

mobileConfirm / mobileQuery

com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileConfirm(Connection conn, String orderId);
com.cosway.razer.bean.MobileConfirmResponseBean responseBean = service.mobileQuery(Connection conn, String orderId);
  1. conn - Database connection.
  1. responseBean - MobileConfirmResponseBean object.
  • responseCode -
  • httpMessage -
  • orderId -
  • orderIdRazer -
  • walletBalance - Only applicable in 'mobileConfirm'
  • instruction -
  • mobileBeanList - StockMobileBean Array
  • serialNo -
  • pin -
  • expiryDate - Date

Mobile Service (Direct Topup)

com.cosway.razer.service.MobileService service = new com.cosway.razer.service.MobileService();

topupWithMobileNo / topupQueryByOrderId

com.cosway.razer.bean.TopupResponseBean responseBean = service.checkTopUpInterval(Connection conn, String mobileNumber, String productCode);
com.cosway.razer.bean.TopupResponseBean responseBean = service.topupWithMobileNo(Connection conn, TopupRequestBean bean);
com.cosway.razer.bean.TopupResponseBean responseBean = service.topupQueryByOrderId(Connection conn, String orderId);
  1. conn - Database connection.
  2. bean - TopupRequestBean object.
  • orderId -
  • ShopperRefNo -
  • Currency -
  • ProductCode -
  • Template -
  • CountryCode -
  • MobileNumber -
  1. responseBean - TopupResponseBean object.
  • responseCode -
  • httpMessage -
  • orderId -
  • orderIdRazer -
  • walletBalance - Only applicable in 'mobileConfirm'
  • instruction -

Updated by Soh Keong over 2 years ago ยท 19 revisions