Project

General

Profile

Specification » History » Version 2

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

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h2. Programming Guide
6
7
h3. Jar version 
8
9
|_. version |_. Description                        |
10
| 1.0       | Init                                 |
11
12
h3. Jar File Download
13
14 2 Soh Keong
"Controller":/redmine/attachments/download/744/MessageFlowController-1.0.jar
15 1 Soh Keong
"Ginota":/redmine/projects/ginota/wiki/Specification#Jar-version
16
"Mocean":/redmine/projects/mocean/wiki/Specification#Jar-version
17 2 Soh Keong
"Properties":/redmine/attachments/download/745/messageControl.properties
18 1 Soh Keong
19
h3. properties file
20
21
* *messageControl.properties*
22
23
# *message.provider*    - 1(Ginota), 2(Mocean)
24
# *otp.length*          - 4/6
25
# *otp.valid.in.second* - 60 ~ 3600 seconds
26
27
h2. MessageService
28
29
<pre>
30
message.controller.service.MessageService service = new message.controller.service.MessageService(); 
31
</pre>
32
33
h3. sendOtp
34
35
<pre>
36
message.controller.bean.ResponseBean resultBean = service.sendOtp(Connection conn, message.controller.bean.RequestOTPBean bean);
37
</pre>
38
39
# *conn*           - Database connection.
40
# *bean*           - RequestOTPBean object.
41
> * *shopperRefNo*     
42
> * *otpId*           - Auto setter
43
> * *transactionCode*
44
> * *mobileTo*
45
> * *companyName*     - message.controller.constant.CommonConstant.COMPANY_NAME_*
46
> * *projectName*     - COSWAY/eCosway/eCos2/Aces
47
48
# *resultBean *    - ResponseBean object.
49
> * *statusCode*         - 0(Success)
50
> * *statucDescription*
51
> * *otpId*              - return this value when verify OTP.
52
> * *serviceProvider*    - return this value when verify OTP.
53
> * *requestId*  
54
> * *messageId*   
55
56
57
h3. verifyPin
58
59
<pre>
60
message.controller.bean.ResponseBean resultBean = service.verifyPin(Connection conn, message.controller.bean.VerifyOtpBean verifyBean)
61
</pre>
62
63
# *conn*           - Database connection.
64
# *verifyBean*        - VerifyOtpBean object.
65
> * *pin*     
66
> * *orderId*         - For recording purpose
67
> * *companyName*     - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*    
68
> * *otpId*           - From Request Pin's resultBean
69
> * *serviceProvider* - From Request Pin's resultBean
70
71
# *resultBean *    - ResponseBean object.
72
> * *statusCode*         - 0(Success)
73
> * *statucDescription*
74
> * *otpId*              
75
> * *serviceProvider*    
76
77
78
h3. sendSms
79
80
<pre>
81
message.controller.bean.ResponseBean resultBean = service.sendSms(Connection conn, message.controller.bean.RequestSmsBean smsBean)
82
</pre>
83
84
# *conn*           - Database connection.
85
# *smsBean*        - SmsBean object.
86
> * *otpId*           - Auto setter
87
> * *transactionCode*
88
> * *mobileTo*
89
> * *companyName*     - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*    
90
> * *shopperRefNo*   
91
> * *mobileFrom*  
92
> * *content*  
93
> * *ResponseUrl*     - For Delivery status update. (Mocean)
94
95
# *resultBean *    - ResponseBean object.
96
> * *statusCode*         - 0(Success)
97
> * *statucDescription*
98
> * *otpId*              
99
> * *serviceProvider*  
100
> * *requestId*  
101
> * *messageId*     
102
> * *totalSms*