Subversion Repositories SmartDukaan

Rev

Rev 32257 | Rev 32260 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32257 Rev 32259
Line 205... Line 205...
205
        LOGGER.info("response" + response);
205
        LOGGER.info("response" + response);
206
    }
206
    }
207
 
207
 
208
    private void sendWhatsappMessage(String message, String title, String mobile, String mediaUrl, String fileName)
208
    private void sendWhatsappMessage(String message, String title, String mobile, String mediaUrl, String fileName)
209
            throws Exception {
209
            throws Exception {
-
 
210
        if (mobile.length() != 10) {
-
 
211
            LOGGER.info("Invalid moble for whatsapp {}", mobile);
-
 
212
            return;
-
 
213
        } else {
-
 
214
            mobile = "91" + mobile;
-
 
215
        }
210
        Map<String, String> requestheaders = new HashMap<>();
216
        Map<String, String> requestheaders = new HashMap<>();
211
        requestheaders.put("Content-Type", "application/x-www-form-urlencoded");
217
        requestheaders.put("Content-Type", "application/x-www-form-urlencoded");
212
        Map<String, String> requestParams = new HashMap<>();
218
        Map<String, String> requestParams = new HashMap<>();
213
        requestParams.put("userid", String.valueOf(2000215976));
219
        requestParams.put("userid", String.valueOf(2000215976));
214
        requestParams.put("password", "MFRd!BBL");
220
        requestParams.put("password", "MFRd!BBL");
215
        requestParams.put("send_to", "91" + mobile);
221
        requestParams.put("send_to", mobile);
216
        requestParams.put("v", "1.1");
222
        requestParams.put("v", "1.1");
217
        requestParams.put("format", "json");
223
        requestParams.put("format", "json");
218
        requestParams.put("method", "SENDMESSAGE");
224
        requestParams.put("method", "SENDMESSAGE");
219
        requestParams.put("auth_scheme", "plain");
225
        requestParams.put("auth_scheme", "plain");
220
        if (mediaUrl == null) {
226
        if (mediaUrl == null) {