Subversion Repositories SmartDukaan

Rev

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

Rev 26638 Rev 26673
Line 73... Line 73...
73
	private static final Map<Integer, String> helpMap = new HashMap<>(6);
73
	private static final Map<Integer, String> helpMap = new HashMap<>(6);
74
	private static final Map<Integer, String> dthIdAliasMap = new HashMap<>(7);
74
	private static final Map<Integer, String> dthIdAliasMap = new HashMap<>(7);
75
	private static Map<Long, List<RechargePlan>> operatorPlanMap = new HashMap<>(20);
75
	private static Map<Long, List<RechargePlan>> operatorPlanMap = new HashMap<>(20);
76
	private static Map<Long, String> mobileProvidersMap;
76
	private static Map<Long, String> mobileProvidersMap;
77
	private static Map<Long, String> dthProvidersMap;
77
	private static Map<Long, String> dthProvidersMap;
78
	private static final String SMS_GATEWAY = "http://103.15.179.45:8449/MessagingGateway/SendTransSMS";
78
	private static final String SMS_GATEWAY = "https://bmg.spicedigital.in/SMSGateway/messagePush";
79
	private static Map<Long, String> allProviders;
79
	private static Map<Long, String> allProviders;
80
	public static Map<RechargeOrderStatus, String> rechargeStatusMap = new HashMap<>();
80
	public static Map<RechargeOrderStatus, String> rechargeStatusMap = new HashMap<>();
81
	public static OrderStatusGroups ORDER_STATUS_GROUPS = new OrderStatusGroups();
81
	public static OrderStatusGroups ORDER_STATUS_GROUPS = new OrderStatusGroups();
82
	public static final String SYSTEM_PARTNER = "testpxps@gmail.com";
82
	public static final String SYSTEM_PARTNER = "testpxps@gmail.com";
83
	private static final RestClient rc = new RestClient();
83
	private static final RestClient rc = new RestClient();
Line 201... Line 201...
201
		return allProviders.get(operatorId);
201
		return allProviders.get(operatorId);
202
	}
202
	}
203
 
203
 
204
	public static void sendSms(String text, String mobileNumber) throws Exception {
204
	public static void sendSms(String text, String mobileNumber) throws Exception {
205
		Map<String, String> paramsMap = new HashMap<>();
205
		Map<String, String> paramsMap = new HashMap<>();
206
		paramsMap.put("Mobile", "91" + mobileNumber);
-
 
207
		paramsMap.put("Username", "smartdukaan");
206
		paramsMap.put("username", "SmartDukaanT");
208
		paramsMap.put("Password", "spice@123");
207
		paramsMap.put("password", "Smart@91");
209
		paramsMap.put("SenderID", "SMTDKN");
208
		paramsMap.put("senderID", "SMTDKN");
210
		paramsMap.put("Message", text);
209
		paramsMap.put("message", text);
-
 
210
		paramsMap.put("mobile", mobileNumber);
211
		paramsMap.put("MessageType", "txt");
211
		paramsMap.put("messageType", "Text");
212
		System.out.println(rc.getResponse(SMS_GATEWAY, paramsMap, null));
212
		rc.getResponse(SMS_GATEWAY, paramsMap, null);
213
	}
213
	}
214
 
214
 
215
	public static void sendMailWithAttachments(JavaMailSender mailSender, String emailTo, String[] cc, String subject,
215
	public static void sendMailWithAttachments(JavaMailSender mailSender, String emailTo, String[] cc, String subject,
216
			String body, List<File> attachments) throws Exception {
216
			String body, List<File> attachments) throws Exception {
217
		MimeMessage message = mailSender.createMimeMessage();
217
		MimeMessage message = mailSender.createMimeMessage();