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