Project

General

Profile

Specification » History » Version 3

Soh Keong, 01/06/2021 04:40 PM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Activity Diagram
6
!Ginota.png!
7
8
h2. Programming Guide
9
10
h3. Jar version 
11
12
|_. version |_. Description        |
13
| 1.11      | Init                 |
14
15
h3. Jar File Download
16
17
"Jar":/redmine/attachments/download/556/SmsClient-1.11.jar
18
"Lib":/redmine/attachments/download/558/lib.rar
19
"Properties":redmine/attachments/download/557/ginota.properties
20
21
h3. properties file
22
23
* *ginota.properties*
24
25
# *ginota.api.key.{DB}.{country/project}*
26
# *ginota.api.secret.{DB}.{country/project}*
27
# *otp.validity.in.second.{DB}.{country/project}*
28
# *local.valid.period.in.second.{DB}.{country/project}*
29
# *url.send.otp*
30
# *url.verify.otp*
31
# *url.send.sms*
32
# *connection.timeout*
33
# *connection.read.timeout*
34
35
h2. Database Table
36
37
<pre>
38
CREATE TABLE OTP_INTERFACE (
39
	OTP_ID VARCHAR(15) NOT NULL,
40
	MOBILE VARCHAR(15) NOT NULL, 
41
	TRX_CODE VARCHAR(5) NOT NULL,
42
	STATUS_CODE VARCHAR(5),
43
	SHOPPER_REF_NO INTEGER, 
44
	STATUS_DESC VARCHAR(100),
45
	REQUEST_ID VARCHAR(20),
46
	TOTAL_SMS INTEGER,	
47
	CREATE_DATETIME TIMESTAMP NOT NULL,
48
	MODIFY_DATETIME TIMESTAMP,
49
	ORDER_ID VARCHAR(15),
50
	PRIMARY KEY (OTP_ID))
51
</pre>
52
53
h2. OTP Service
54
55
<pre>
56
com.cosway.ginota.service.OtpService service = new com.cosway.ginota.service.OtpService(); 
57
</pre>
58
59
h3. sendOTP 
60
61
<pre>
62
com.cosway.ginota.bean.ResultBean result = service.sendOTP(Connection conn, com.cosway.ginota.bean.OTPBean otpBean)
63
</pre>
64 2 Soh Keong
65
# *conn*           - Database connection.
66
# *otpBean*        - OTPBean object.
67
> * *shopperRefNo*     
68
> * *otpId*           - Auto setter
69
> * *transactionCode*
70
> * *mobileTo*
71 3 Soh Keong
> * *companyName*     - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*
72 2 Soh Keong
73
# *result*        - ResultBean object.
74 1 Soh Keong
> * *statusCode*
75 3 Soh Keong
> * *otpId*
76 2 Soh Keong
> * *statucDescription*
77
> * *requestId*  
78
> * *messageId*     
79 1 Soh Keong
> * *totalSms*     
80 3 Soh Keong
81
h3. verifyPin
82
83
<pre>
84
com.cosway.ginota.bean.ResultBean result = service.verifyPin(Connection conn, com.cosway.ginota.bean.VerifyBean verifyBean)
85
</pre>
86
87
# *conn*           - Database connection.
88
# *verifyBean*        - VerifyBean object.
89
> * *pin*     
90
> * *companyName*     - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*    
91
> * *otpId* 
92
93
h3. updateUsedPin
94
95
<pre>
96
com.cosway.ginota.bean.ResultBean result = service.updateUsedPin(Connection conn, com.cosway.ginota.bean.UpdateSuccessBean updateBean)
97
</pre>
98
99
# *conn*           - Database connection.
100
# *updateBean*        - UpdateSuccessBean object.
101
> * *otpId*   
102
> * *orderId*   
103
104
h3. sendSms
105
106
<pre>
107
com.cosway.ginota.bean.ResultBean result = service.sendSms(Connection conn, com.cosway.ginota.bean.SmsBean smsBean)
108
</pre>
109
110
# *conn*           - Database connection.
111
# *smsBean*        - SmsBean object.
112
> * *otpId*           - Auto setter
113
> * *transactionCode*
114
> * *mobileTo*
115
> * *companyName*     - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*
116
> * *shopperRefNo*   
117
> * *mobileFrom*  
118
> * *content*   
119
120
121