Пример #1
0
        public Task SendAsync(IdentityMessage message)
        {
            // Plug in your SMS service here to send a text message.
            var _smsService = new SmsServiceTemp();

            string body        = message.Body;
            string destination = message.Destination;
            var    sms         = new Sms()
            {
                Sender    = "AJAOKO",
                Message   = body,
                Recipient = destination
            };
            bool   isSuccess = false;
            string errMsg    = null;
            string response  = _smsService.Send(sms); //Send sms

            string code = _smsService.GetResponseMessage(response, out isSuccess, out errMsg);

            if (!isSuccess)
            {
                isSuccess = false;
            }
            else
            {
                isSuccess = true;
            }

            return(Task.FromResult(true));
        }
Пример #2
0
 public NotificationsController()
 {
     _smsService = new SmsServiceTemp();
 }
Пример #3
0
 public SmsController()
 {
     _smsService = new SmsServiceTemp();
 }
Пример #4
0
 public CheckoutController()
 {
     _smsService = new SmsServiceTemp();
     storeDB     = new AjaoOkoDb();
 }