diff --git a/GMENepal/GMENepalAPIService/GMENepalAPI.cs b/GMENepal/GMENepalAPIService/GMENepalAPI.cs index 71046db..d209d93 100644 --- a/GMENepal/GMENepalAPIService/GMENepalAPI.cs +++ b/GMENepal/GMENepalAPIService/GMENepalAPI.cs @@ -16,6 +16,8 @@ using System.Linq; using System.Reflection; using System.Security.Cryptography; using System.Text; +using Repository.DAO.ThirdParty; + namespace GMENepal.GMENepalAPIService { @@ -300,6 +302,9 @@ namespace GMENepal.GMENepalAPIService } else { + ThirdPartyRepo thirdPartyRepo = new ThirdPartyRepo(); + var resp = thirdPartyRepo.SyncTxnAsComment(gS.PartnerId, gS.ControlNo, gS.ControlNo, "", response.Msg); + _response.ResponseCode = response.ResponseCode; _response.Msg = response.Msg; diff --git a/Repository/DAO/ThirdParty/ThirdPartyRepo.cs b/Repository/DAO/ThirdParty/ThirdPartyRepo.cs index 33f7615..3e75f2d 100644 --- a/Repository/DAO/ThirdParty/ThirdPartyRepo.cs +++ b/Repository/DAO/ThirdParty/ThirdPartyRepo.cs @@ -1010,5 +1010,17 @@ namespace Repository.DAO.ThirdParty StringBuilder sb = new StringBuilder(sql); return ParseDbResult(sb); } + + public TPResponse SyncTxnAsComment(string provider, string tranId, string ControlNo, string status, string msg) + { + string sql = "EXEC PROC_TP_TXN_PUSH @flag='add-api-comment'"; + sql += ",@PROVIDER = " + FilterString(provider); + sql += ",@TRAN_ID = " + FilterString(tranId); + sql += ",@message = " + FilterString(msg); + sql += ",@status = " + FilterString(status); + sql += ",@user = " + FilterString("TxnPushJob"); + StringBuilder sb = new StringBuilder(sql); + return ParseDbResult(sb); + } } } \ No newline at end of file