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