public async Task SendNoRefundDepositDoneMail(string email, double amount, string assetBcnId)
 {
     var msgData = new NoRefundDepositDoneData
     {
         Amount     = amount,
         AssetBcnId = assetBcnId
     };
     await _emailSender.SendEmailAsync(email, msgData);
 }
Ejemplo n.º 2
0
        public async Task <CommandHandlingResult> Handle(SendNoRefundDepositDoneMailCommand command)
        {
            ChaosKitty.Meow();

            var content = new NoRefundDepositDoneData
            {
                Amount     = command.Amount,
                AssetBcnId = command.AssetId
            };
            await _emailSender.SendEmailAsync(command.Email, content);

            return(CommandHandlingResult.Ok());
        }
Ejemplo n.º 3
0
        public async Task <EmailMessage> GenerateNoRefundDepositDoneMsg(NoRefundDepositDoneData messageData)
        {
            var asset = await FindAssetByBlockchainAssetIdAsync(messageData.AssetBcnId);

            var templateVm = new BtcDepositDoneTempate
            {
                AssetName = asset.Id == LykkeConstants.LykkeAssetId ? EmailResources.LykkeCoins_name : asset.Name,
                Amount    = messageData.Amount,
                Year      = DateTime.UtcNow.Year
            };

            var emailMessage = new EmailMessage
            {
                Body    = await _templateGenerator.GenerateAsync("NoRefundDepositDoneTemplate", templateVm),
                Subject = string.Format(EmailResources.Deposit_no_refund_done_subject, templateVm.AssetName),
                IsHtml  = true
            };

            return(emailMessage);
        }