Project

General

Profile

Specification » History » Version 6

Soh Keong, 04/27/2023 10:30 AM

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