示例#1
0
        private MvcMailMessage EmailConfirmationForBlackstonePos(ReceiptResponse receipt, ReceiptConfigViewModel receiptConfig)
        {
            try
            {
                receipt.PhoneNumber = ServiceImplementationUtils.GetAmericanFormat(receipt.PhoneNumber);

                //Filling the ViewData to be displayed in the email (ignoring the PhoneRecharged)
                ServiceImplementationUtils.LoadDictionaryfromType(ViewData, receipt);

                ViewBag.LogoUrl = receiptConfig.LogoUrl;
                ViewBag.Company = receiptConfig.Company;

                return Populate(x =>
                {
                    x.From = new MailAddress(receiptConfig.EmailId);
                    x.Subject = receiptConfig.Subject;
                    x.To.Add(receiptConfig.Email);
                    x.ViewName = "Confirmation";
                });
            }
            catch (Exception exception)
            {
                _logger.Error(exception.StackTrace);
                return null;
            }
        }
示例#2
0
        private ReceiptConfigViewModel GetReceiptConfigForBlackstone(string email)
        {
            var result = new ReceiptConfigViewModel
            {
                EmailId = @System.Configuration.ConfigurationManager.AppSettings["bsposMailId"],
                Company = "Blackstone POS",
                Email = email,
                LogoUrl = "http://mobile.blackstonepos.com/logos/pos-logo.png",
                Subject = "Blackstone POS Product Sale Confirmation"
            };

            return result;
        }
示例#3
0
        private ReceiptConfigViewModel GetReceiptConfigForFullCarga(string email)
        {
            var result = new ReceiptConfigViewModel
            {
                EmailId = @System.Configuration.ConfigurationManager.AppSettings["fcusaMailId"],
                Company = "Full Carga",
                Email = email,
                LogoUrl = "http://mobile.blackstonepos.com/logos/fullCarga.png",
                Subject = "FCUSA Transaction Confirmation"
            };

            return result;
        }
示例#4
0
        private MvcMailMessage EmailConfirmationForFullCarga(ReceiptResponse receipt, int merchantId, ReceiptConfigViewModel receiptConfig)
        {
            try
            {
                var bodyMessageForFullCarga = _blackstoneService.GetFullCargaSmsFormat(receipt, merchantId);

                ServiceImplementationUtils.LoadDictionaryFromFormattedText(ViewData, bodyMessageForFullCarga);

                ViewBag.LogoUrl = receiptConfig.LogoUrl;
                ViewBag.Company = receiptConfig.Company;

                return Populate(x =>
                {
                    x.From = new MailAddress(receiptConfig.EmailId);
                    x.Subject = receiptConfig.Subject;
                    x.To.Add(receiptConfig.Email);
                    x.ViewName = "Confirmation";
                });
            }
            catch (Exception exception)
            {
                _logger.Error(exception.StackTrace);
                return null;
            }
        }