Project

General

Profile

Specification » History » Version 2

Soh Keong, 03/23/2023 09:41 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
13
h3. Jar File Download
14
15
"Jar":
16
"Properties":
17
18
h3. properties file
19
20
* *mocean.properties*
21
22
# *api.key.{DB}.{country/project}*
23
# *api.secret.{DB}.{country/project}*
24
# *url.domain*                             - Mocean Domain name
25
# *url.sms*                                - Send SMS
26
# *url.otp.ppc*                            - OTP via sms and voice
27
# *url.otp.ppa*                            - OTP via sms
28
# *url.verify*                             - Verify OTP code
29
# *url.query*                              - Message delivery status
30
# *dlr.mask*                               - Delivery Report  0=No, 1=Yes
31
# *response.format*                        - JSON/XML
32
# *otp.validity.in.second*
33
# *local.valid.period.in.second*
34
# *connection.timeout*
35
# *connection.read.timeout*
36
# *allow.list*                             - If enable, only phone number in the list allow to sent.
37
38
h2. Database Table
39
40
<pre>
41
CREATE TABLE MOCEAN_INTERFACE (
42
	OTP_ID VARCHAR(15) NOT NULL,
43
	MOBILE VARCHAR(15) NOT NULL, 
44
	TRX_CODE VARCHAR(5) NOT NULL,
45
	SHOPPER_REF_NO INTEGER, 
46
	STATUS_CODE VARCHAR(5),
47
	STATUS_DESC VARCHAR(100),
48
	REQUEST_ID VARCHAR(50),
49
	REQUEST_ID_EXTRA VARCHAR(100),
50
	DELIVERY_STATUS INTEGER,
51
	TOTAL_SMS INTEGER,
52
	CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
53
	MODIFY_DATETIME TIMESTAMP,
54
	ORDER_ID VARCHAR(15),
55
	PRIMARY KEY (OTP_ID))
56
</pre>
57
58
h2. SMS Service
59
60
<pre>
61 2 Soh Keong
com.mocean.service.MoceanService service = new com.mocean.service.MoceanService();
62 1 Soh Keong
</pre>
63 2 Soh Keong
64
h3. sendSms 
65
66
<pre>
67
com.mocean.bean.MoceanMessageBean result = service.sendSms(Connection conn, com.mocean.bean.RequestSmsSendBean bean)
68
</pre>
69
70
# *conn*           - Database connection.
71
# *bean   *        - RequestSmsSendBean object.
72
> * *shopperRefNo*     
73
> * *otpId*           - Auto setter
74
> * *transactionCode*
75
> * *mobile*
76
> * *sender*
77
> * *content*
78
> * *responseUrl*     - Backend Response with PUT servlet
79
> * *charset*
80
> * *companyName*     - com.mocean.constant.CommonConstant.COMPANY_NAME_*
81
82
83
# *result*        - ResultBean object.
84
> * *statusCode*
85
> * *otpId*
86
> * *errorMessage*
87
> * *messageId*     
88
> * *messageIdExtra*  - For exceed more than 1 sms sent. (max length per sms = 153)
89
> * *totalSms*   
90
> * *deliveryStatus* 
91
> * *creditDeducted*