Specification » History » Revision 6
Revision 5 (Soh Keong, 04/18/2023 11:52 AM) → Revision 6/7 (Soh Keong, 04/27/2023 10:30 AM)
{{toc}}
h1. Specification
h1. Activity Diagram
!message.jpg!
h2. Programming Guide
h3. Jar version
|_. version |_. Description |
| 1.0 | Init |
h3. Jar File Download
"Controller":/redmine/attachments/download/754/MessageFlowController-1.0.jar
"Ginota":/redmine/projects/ginota/wiki/Specification#Jar-version
"Mocean":/redmine/projects/mocean/wiki/Specification#Jar-version
"Properties":/redmine/attachments/download/745/messageControl.properties
h3. properties file
* *messageControl.properties*
# *message.provider* - 1(Ginota), 2(Mocean)
# *otp.length* - 4/6
# *otp.valid.in.second* - 60 ~ 3600 seconds
h2. MessageService
<pre>
message.controller.service.MessageService service = new message.controller.service.MessageService();
</pre>
h3. sendOtp
<pre>
message.controller.bean.ResponseBean resultBean = service.sendOtp(Connection conn, message.controller.bean.RequestOTPBean bean);
</pre>
# *conn* - Database connection.
# *bean* - RequestOTPBean object.
> * *shopperRefNo*
> * *otpId* - Auto setter
> * *transactionCode*
> * *mobileTo*
> * *companyName* - message.controller.constant.CommonConstant.COMPANY_NAME_*
> * *projectName* - COSWAY/eCosway/eCos2/Aces
# *resultBean * - ResponseBean object.
> * *statusCode* - 0(Success)
> * *statucDescription*
> * *otpId* - return this value when verify OTP.
> * *serviceProvider* - return this value when verify OTP.
> * *requestId*
> * *messageId*
h3. verifyPin
<pre>
message.controller.bean.ResponseBean resultBean = service.verifyPin(Connection conn, message.controller.bean.VerifyOtpBean verifyBean)
</pre>
# *conn* - Database connection.
# *verifyBean* - VerifyOtpBean object.
> * *pin*
> * *orderId* - For recording purpose
> * *companyName* - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*
> * *otpId* - From Request Pin's resultBean
> * *serviceProvider* - From Request Pin's resultBean
# *resultBean * - ResponseBean object.
> * *statusCode* - 0(Success)
> * *statucDescription*
> * *otpId*
> * *serviceProvider*
h3. sendSms
<pre>
message.controller.bean.ResponseBean resultBean = service.sendSms(Connection conn, message.controller.bean.RequestSmsBean smsBean)
</pre>
# *conn* - Database connection.
# *smsBean* - SmsBean object.
> * *otpId* - Auto setter
> * *transactionCode*
> * *mobileTo*
> * *companyName* - com.cosway.ginota.constant.CommonConstant.COMPANY_NAME_*
> * *shopperRefNo*
> * *mobileFrom*
> * *content*
> * *ResponseUrl* - For Delivery status update. (Mocean)
# *resultBean * - ResponseBean object.
> * *statusCode* - 0(Success)
> * *statucDescription*
> * *otpId*
> * *serviceProvider*
> * *requestId*
> * *messageId*
> * *totalSms*