Project

General

Profile

Specification » History » Version 10

Soh Keong, 04/07/2023 10:55 AM

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