Project

General

Profile

Specification » History » Revision 6

Revision 5 (Soh Keong, 08/10/2022 12:04 PM) → Revision 6/10 (Soh Keong, 10/05/2022 10:02 AM)

{{toc}} 

 h1. Specification 

 h1. Activity Diagram 
 !Ginota.png! 

 h2. Programming Guide 

 h3. Jar version  

 |_. version |_. Description                     | 
 | 1.11        | Init                              | 
 | 1.12        | Added Allow List in development | 
 | 1.13        | Added Bulk SMS account            | 

 h3. Jar File Download 

 "Jar":/redmine/attachments/download/719/SmsClient-1.13.jar "Jar":/redmine/attachments/download/671/SmsClient-1.12.jar 
 "Lib":/redmine/attachments/download/558/lib.rar 
 "Properties":/redmine/attachments/download/718/ginota.properties "Properties":/redmine/attachments/download/557/ginota.properties 

 h3. properties file 

 * *ginota.properties* 

 # *ginota.api.key.{DB}.{country/project}* 
 # *ginota.api.secret.{DB}.{country/project}* 
 # *otp.validity.in.second.{DB}.{country/project}* 
 # *local.valid.period.in.second.{DB}.{country/project}* 
 # *url.send.otp* 
 # *url.verify.otp* 
 # *url.send.sms* 
 # *connection.timeout* 
 # *connection.read.timeout* 

 h2. Database Table 

 <pre> 
 CREATE TABLE OTP_INTERFACE ( 
	 OTP_ID VARCHAR(15) NOT NULL, 
	 MOBILE VARCHAR(15) NOT NULL,  
	 TRX_CODE VARCHAR(5) NOT NULL, 
	 STATUS_CODE VARCHAR(5), 
	 SHOPPER_REF_NO INTEGER,  
	 STATUS_DESC VARCHAR(100), 
	 REQUEST_ID VARCHAR(20), 
	 TOTAL_SMS INTEGER, 	
	 CREATE_DATETIME TIMESTAMP NOT NULL, 
	 MODIFY_DATETIME TIMESTAMP, 
	 ORDER_ID VARCHAR(15), 
	 PRIMARY KEY (OTP_ID)) 
 </pre> 

 h2. OTP Service 

 <pre> 
 com.cosway.ginota.service.OtpService service = new com.cosway.ginota.service.OtpService();  
 </pre> 

 h3. sendOTP  

 <pre> 
 com.cosway.ginota.bean.ResultBean result = service.sendOTP(Connection conn, com.cosway.ginota.bean.OTPBean otpBean) 
 </pre> 

 # *conn*             - Database connection. 
 # *otpBean*          - OTPBean object. 
 > * *shopperRefNo*      
 > * *otpId*             - Auto setter 
 > * *transactionCode* 
 > * *mobileTo* 
 > * *companyName*       - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_* 

 # *result*          - ResultBean object. 
 > * *statusCode* 
 > * *otpId* 
 > * *statucDescription* 
 > * *requestId*   
 > * *messageId*      
 > * *totalSms*      

 h3. verifyPin 

 <pre> 
 com.cosway.ginota.bean.ResultBean result = service.verifyPin(Connection conn, com.cosway.ginota.bean.VerifyBean verifyBean) 
 </pre> 

 # *conn*             - Database connection. 
 # *verifyBean*          - VerifyBean object. 
 > * *pin*      
 > * *companyName*       - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*     
 > * *otpId*  

 h3. updateUsedPin 

 <pre> 
 com.cosway.ginota.bean.ResultBean result = service.updateUsedPin(Connection conn, com.cosway.ginota.bean.UpdateSuccessBean updateBean) 
 </pre> 

 # *conn*             - Database connection. 
 # *updateBean*          - UpdateSuccessBean object. 
 > * *otpId*    
 > * *orderId*    

 h3. sendSms 

 <pre> 
 com.cosway.ginota.bean.ResultBean result = service.sendSms(Connection conn, com.cosway.ginota.bean.SmsBean smsBean) 
 </pre> 

 # *conn*             - Database connection. 
 # *smsBean*          - SmsBean object. 
 > * *otpId*             - Auto setter 
 > * *transactionCode* 
 > * *mobileTo* 
 > * *companyName*       - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_* 
 > * *shopperRefNo*    
 > * *mobileFrom*   
 > * *content*