| Line 39... |
Line 39... |
| 39 |
private static final String OTP_TEMPLATE_ID = "1507161889822750240";
|
39 |
private static final String OTP_TEMPLATE_ID = "1507161889822750240";
|
| 40 |
//LOI OTP
|
40 |
//LOI OTP
|
| 41 |
public static final String LOI_ACCEPTANCE_OTP_TEMPLATE_ID = "1707171687739961361";
|
41 |
public static final String LOI_ACCEPTANCE_OTP_TEMPLATE_ID = "1707171687739961361";
|
| 42 |
public static final String DLT_PRINCIPLE_ENTITY_ID = "1501589330000013091";
|
42 |
public static final String DLT_PRINCIPLE_ENTITY_ID = "1501589330000013091";
|
| 43 |
public static final String LOI_ACCEPTANCE_OTP_TEMPLATE = "Dear %s,\nThank you for showing your interest in the SmartDukaan franchise.\n%s is the OTP for your LOI acceptance.\nPlease read the LOI and provide your consent by sharing OTP with the SmartDukaan team.\nBest Regards,\nSmartDukaan Team.";
|
43 |
public static final String LOI_ACCEPTANCE_OTP_TEMPLATE = "Dear %s,\nThank you for showing your interest in the SmartDukaan franchise.\n%s is the OTP for your LOI acceptance.\nPlease read the LOI and provide your consent by sharing OTP with the SmartDukaan team.\nBest Regards,\nSmartDukaan Team.";
|
| 44 |
private static final String USER = "smartdukaanOTP";
|
44 |
private static final String USER = "devkinandan.lal";
|
| 45 |
private static final String PASS = "Amit@Smart123";
|
45 |
private static final String PASS = "smartdukaan@123";
|
| 46 |
private static final String SPECTRA_TELEMARKETER = "1502472910000014692";
|
46 |
private static final String SPECTRA_TELEMARKETER = "1502472910000014692";
|
| 47 |
private static String NEXG_API_ENDPOINT = "https://api2.nexgplatforms.com/sms/1/text/query";
|
47 |
//private static String NEXG_API_ENDPOINT = "https://api2.nexgplatforms.com/sms/1/text/query";
|
| - |
|
48 |
private static String NEXG_API_ENDPOINT = "https://automate.nexgplatforms.com/api/v1/sentsms";
|
| 48 |
|
49 |
|
| 49 |
@Autowired
|
50 |
@Autowired
|
| 50 |
OtpRepository otpRepository;
|
51 |
OtpRepository otpRepository;
|
| 51 |
|
52 |
|
| 52 |
@Autowired
|
53 |
@Autowired
|
| Line 187... |
Line 188... |
| 187 |
|
188 |
|
| 188 |
}
|
189 |
}
|
| 189 |
|
190 |
|
| 190 |
public String sendSms(String dltTemplateId, String message, String mobileNumber) throws Exception {
|
191 |
public String sendSms(String dltTemplateId, String message, String mobileNumber) throws Exception {
|
| 191 |
Map<String, String> queryParams = new HashMap<>();
|
192 |
Map<String, String> queryParams = new HashMap<>();
|
| 192 |
queryParams.put("from", SENDER);
|
193 |
queryParams.put("header", SENDER);
|
| 193 |
queryParams.put("indiaDltContentTemplateId", dltTemplateId);
|
194 |
queryParams.put("templateid", dltTemplateId);
|
| 194 |
queryParams.put("indiaDltPrincipalEntityId", DLT_PRINCIPLE_ENTITY_ID);
|
195 |
queryParams.put("entityid", DLT_PRINCIPLE_ENTITY_ID);
|
| 195 |
queryParams.put("indiaDltTelemarketerId", SPECTRA_TELEMARKETER);
|
196 |
queryParams.put("contactnumber", "91" + mobileNumber);
|
| 196 |
queryParams.put("to", "91" + mobileNumber);
|
197 |
queryParams.put("message", message);
|
| 197 |
queryParams.put("text", message);
|
198 |
queryParams.put("messageType", "normal");
|
| - |
|
199 |
queryParams.put("serviceType", "otp");
|
| 198 |
queryParams.put("password", PASS);
|
200 |
queryParams.put("password", PASS);
|
| 199 |
queryParams.put("username", USER);
|
201 |
queryParams.put("username", USER);
|
| 200 |
//OTP Message Template
|
202 |
//OTP Message Template
|
| 201 |
|
203 |
|
| 202 |
String response = restClient.post(NEXG_API_ENDPOINT, queryParams, new HashMap<>(), new HashMap<>());
|
204 |
String response = restClient.post(NEXG_API_ENDPOINT, queryParams, new HashMap<>(), new HashMap<>());
|