Subversion Repositories SmartDukaan

Rev

Rev 26672 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26672 Rev 26673
Line 20... Line 20...
20
import com.spice.profitmandi.web.res.OTPResponse;
20
import com.spice.profitmandi.web.res.OTPResponse;
21
 
21
 
22
@Component
22
@Component
23
public class OtpProcessor {
23
public class OtpProcessor {
24
 
24
 
25
	private static final String SMS_GATEWAY = "http://103.15.179.45:8449/MessagingGateway/SendTransSMS";
25
	private static final String SMS_GATEWAY = "https://bmg.spicedigital.in/SMSGateway/messagePush";
26
	private static final int len = 5;
26
	private static final int len = 5;
27
	private static final String numbers = "0123456789";
27
	private static final String numbers = "0123456789";
28
	private static final String text = "Dear Customer, {0} is the OTP that you have requested to login into SmartDukaan. Don't share your OTP with anyone.";
28
	private static final String text = "Dear Customer, {0} is the OTP that you have requested to login into SmartDukaan. Don't share your OTP with anyone.";
29
 
29
 
30
	@Autowired
30
	@Autowired
Line 137... Line 137...
137
 
137
 
138
	}
138
	}
139
	
139
	
140
	public void sendSms(String text, String mobileNumber) throws Exception {
140
	public void sendSms(String text, String mobileNumber) throws Exception {
141
		Map<String, String> paramsMap = new HashMap<>();
141
		Map<String, String> paramsMap = new HashMap<>();
142
		paramsMap.put("Mobile", "91" + mobileNumber);
-
 
143
		paramsMap.put("Username", "smartdukaan");
142
		paramsMap.put("username", "SmartDukaanT");
144
		paramsMap.put("Password", "spice@123");
143
		paramsMap.put("password", "Smart@91");
145
		paramsMap.put("SenderID", "SMTDKN");
144
		paramsMap.put("senderID", "SMTDKN");
146
		paramsMap.put("Message", text);
145
		paramsMap.put("message", text);
-
 
146
		paramsMap.put("mobile", mobileNumber);
147
		paramsMap.put("MessageType", "txt");
147
		paramsMap.put("messageType", "Text");
148
		restClient.getResponse(SMS_GATEWAY, paramsMap, null);
148
		restClient.getResponse(SMS_GATEWAY, paramsMap, null);
149
	}
149
	}
150
 
150
 
151
}
151
}
152
152