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