6 Commits

  1. 27
      SendMail/Business/TxnPush.cs
  2. 3
      SendMail/Common/Notification.cs
  3. 1
      SendMail/Common/TxnDetails.cs
  4. 3
      SendMail/DAO/TxnPushDAO.cs

27
SendMail/Business/TxnPush.cs

@ -71,7 +71,6 @@ namespace JMETxnPushScheduler.Business
GetTxnDetails(item["ID"].ToString());
}
}
}
else if (_dbRes.Msg == "394488")
{
if (result.ResponseCode == "0")
@ -179,6 +178,32 @@ namespace JMETxnPushScheduler.Business
Console.Write(JsonConvert.SerializeObject(r1));
}
if(cd.payStatus.ToUpper() == "PAID")
{
SendNotificationRequestMobile request = new SendNotificationRequestMobile()
{
IsBulkNotification = false,
UserName = cd.email,
ProcessId = "PaidTxnPushNotification",
ProviderId = NotifyTemplate.PAID_TXN.ToString(),
NotificationTypeId = NOTIFICATION_TYPE.PUSH_NOTIFICATION.ToString(),
Template = NotifyTemplate.PAID_TXN,
Recipients = new List<RecipientViewModel>()
{
new RecipientViewModel()
{
NotificationContent = new NotificationDTO() {
Body = JsonConvert.SerializeObject(bodyMappings),
//Title will be set by mapping json
},
Address= cd.email
}
}
};
var r1 = NotifierV2.SendNotification(request);
Console.Write(JsonConvert.SerializeObject(r1));
}
}

3
SendMail/Common/Notification.cs

@ -25,5 +25,8 @@ namespace JMETxnPushScheduler.Common
[Description("Email to customer after txn has been accepted by Pay-out partner (Cash Collection)")]
CASH_TXN_POST = 4,
[Description("Push notification to the customer afte the txn is paid")]
PAID_TXN = 4
}
}

1
SendMail/Common/TxnDetails.cs

@ -22,5 +22,6 @@ namespace JMETxnPushScheduler.Common
public string TotalAmount { get; set; }
public string paymentMethod { get; set; }
public string email { get; set; }
public string payStatus { get; set; }
}
}

3
SendMail/DAO/TxnPushDAO.cs

@ -34,8 +34,6 @@ namespace JMETxnPushScheduler.DAO
{
string sql = "EXEC PROC_TP_TXN_PUSH @FLAG = 'UPDATE-POST_RELEASE'";
sql += ", @TRAN_ID = " + FilterString(id);
//sql += ", @pCurrCostRate = " + FilterString(pCurrCostRate);
//sql += ", @@control2 = " + FilterString(controlNo2);
ExecuteDataTable(sql);
}
@ -80,6 +78,7 @@ namespace JMETxnPushScheduler.DAO
userDetails.serviceCharge = row["serviceCharge"].ToString();
// userDetails.rewardPoints = row["rewardPoints"].ToString();
userDetails.TranDate = row["createdDate"].ToString();
userDetails.payStatus = row["payStatus"].ToString();
}
return userDetails;

Loading…
Cancel
Save