shakun
1 year ago
commit
4e433d3a92
18 changed files with 2121 additions and 0 deletions
-
539.gitignore
-
25SendMail.sln
-
22SendMail/API/RestApiClient.cs
-
120SendMail/API/SendTransactionServices.cs
-
21SendMail/App.config
-
47SendMail/Business/GetStatic.cs
-
71SendMail/Business/SendEmail.cs
-
103SendMail/Business/SmtpMailSetting.cs
-
183SendMail/Business/TxnPush.cs
-
63SendMail/Common/CommonResponse.cs
-
172SendMail/Common/SendTransactionRequest.cs
-
269SendMail/DAO/SwiftDao.cs
-
282SendMail/DAO/TxnPushDAO.cs
-
115SendMail/JMETxnPushScheduler.csproj
-
21SendMail/Program.cs
-
36SendMail/Properties/AssemblyInfo.cs
-
28SendMail/Repository/SendRepository.cs
-
4SendMail/packages.config
@ -0,0 +1,539 @@ |
|||||
|
|
||||
|
# Created by https://www.gitignore.io/api/visualstudio |
||||
|
# Edit at https://www.gitignore.io/?templates=visualstudio |
||||
|
|
||||
|
### VisualStudio ### |
||||
|
## Ignore Visual Studio temporary files, build results, and |
||||
|
## files generated by popular Visual Studio add-ons. |
||||
|
## |
||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore |
||||
|
|
||||
|
# User-specific files |
||||
|
*.rsuser |
||||
|
*.suo |
||||
|
*.user |
||||
|
*.userosscache |
||||
|
*.sln.docstates |
||||
|
|
||||
|
# User-specific files (MonoDevelop/Xamarin Studio) |
||||
|
*.userprefs |
||||
|
|
||||
|
# Mono auto generated files |
||||
|
mono_crash.* |
||||
|
|
||||
|
# Build results |
||||
|
[Dd]ebug/ |
||||
|
[Dd]ebugPublic/ |
||||
|
[Rr]elease/ |
||||
|
[Rr]eleases/ |
||||
|
x64/ |
||||
|
x86/ |
||||
|
[Aa][Rr][Mm]/ |
||||
|
[Aa][Rr][Mm]64/ |
||||
|
bld/ |
||||
|
[Bb]in/ |
||||
|
[Oo]bj/ |
||||
|
[Ll]og/ |
||||
|
|
||||
|
# Visual Studio 2015/2017 cache/options directory |
||||
|
.vs/ |
||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot |
||||
|
#wwwroot/ |
||||
|
|
||||
|
# Visual Studio 2017 auto generated files |
||||
|
Generated\ Files/ |
||||
|
|
||||
|
# MSTest test Results |
||||
|
[Tt]est[Rr]esult*/ |
||||
|
[Bb]uild[Ll]og.* |
||||
|
|
||||
|
# NUnit |
||||
|
*.VisualState.xml |
||||
|
TestResult.xml |
||||
|
nunit-*.xml |
||||
|
|
||||
|
# Build Results of an ATL Project |
||||
|
[Dd]ebugPS/ |
||||
|
[Rr]eleasePS/ |
||||
|
dlldata.c |
||||
|
|
||||
|
# Benchmark Results |
||||
|
BenchmarkDotNet.Artifacts/ |
||||
|
|
||||
|
# .NET Core |
||||
|
project.lock.json |
||||
|
project.fragment.lock.json |
||||
|
artifacts/ |
||||
|
|
||||
|
# StyleCop |
||||
|
StyleCopReport.xml |
||||
|
|
||||
|
# Files built by Visual Studio |
||||
|
*_i.c |
||||
|
*_p.c |
||||
|
*_h.h |
||||
|
*.ilk |
||||
|
*.meta |
||||
|
*.obj |
||||
|
*.iobj |
||||
|
*.pch |
||||
|
*.pdb |
||||
|
*.ipdb |
||||
|
*.pgc |
||||
|
*.pgd |
||||
|
*.rsp |
||||
|
*.sbr |
||||
|
*.tlb |
||||
|
*.tli |
||||
|
*.tlh |
||||
|
*.tmp |
||||
|
*.tmp_proj |
||||
|
*_wpftmp.csproj |
||||
|
*.log |
||||
|
*.vspscc |
||||
|
*.vssscc |
||||
|
.builds |
||||
|
*.pidb |
||||
|
*.svclog |
||||
|
*.scc |
||||
|
|
||||
|
# Chutzpah Test files |
||||
|
_Chutzpah* |
||||
|
|
||||
|
# Visual C++ cache files |
||||
|
ipch/ |
||||
|
*.aps |
||||
|
*.ncb |
||||
|
*.opendb |
||||
|
*.opensdf |
||||
|
*.sdf |
||||
|
*.cachefile |
||||
|
*.VC.db |
||||
|
*.VC.VC.opendb |
||||
|
|
||||
|
# Visual Studio profiler |
||||
|
*.psess |
||||
|
*.vsp |
||||
|
*.vspx |
||||
|
*.sap |
||||
|
|
||||
|
# Visual Studio Trace Files |
||||
|
*.e2e |
||||
|
|
||||
|
# TFS 2012 Local Workspace |
||||
|
$tf/ |
||||
|
|
||||
|
# Guidance Automation Toolkit |
||||
|
*.gpState |
||||
|
|
||||
|
# ReSharper is a .NET coding add-in |
||||
|
_ReSharper*/ |
||||
|
*.[Rr]e[Ss]harper |
||||
|
*.DotSettings.user |
||||
|
|
||||
|
# JustCode is a .NET coding add-in |
||||
|
.JustCode |
||||
|
|
||||
|
# TeamCity is a build add-in |
||||
|
_TeamCity* |
||||
|
|
||||
|
# DotCover is a Code Coverage Tool |
||||
|
*.dotCover |
||||
|
|
||||
|
# AxoCover is a Code Coverage Tool |
||||
|
.axoCover/* |
||||
|
!.axoCover/settings.json |
||||
|
|
||||
|
# Visual Studio code coverage results |
||||
|
*.coverage |
||||
|
*.coveragexml |
||||
|
|
||||
|
# NCrunch |
||||
|
_NCrunch_* |
||||
|
.*crunch*.local.xml |
||||
|
nCrunchTemp_* |
||||
|
|
||||
|
# MightyMoose |
||||
|
*.mm.* |
||||
|
AutoTest.Net/ |
||||
|
|
||||
|
# Web workbench (sass) |
||||
|
.sass-cache/ |
||||
|
|
||||
|
# Installshield output folder |
||||
|
[Ee]xpress/ |
||||
|
|
||||
|
# DocProject is a documentation generator add-in |
||||
|
DocProject/buildhelp/ |
||||
|
DocProject/Help/*.HxT |
||||
|
DocProject/Help/*.HxC |
||||
|
DocProject/Help/*.hhc |
||||
|
DocProject/Help/*.hhk |
||||
|
DocProject/Help/*.hhp |
||||
|
DocProject/Help/Html2 |
||||
|
DocProject/Help/html |
||||
|
|
||||
|
# Click-Once directory |
||||
|
publish/ |
||||
|
|
||||
|
# Publish Web Output |
||||
|
*.[Pp]ublish.xml |
||||
|
*.azurePubxml |
||||
|
# Note: Comment the next line if you want to checkin your web deploy settings, |
||||
|
# but database connection strings (with potential passwords) will be unencrypted |
||||
|
*.pubxml |
||||
|
*.publishproj |
||||
|
|
||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to |
||||
|
# checkin your Azure Web App publish settings, but sensitive information contained |
||||
|
# in these scripts will be unencrypted |
||||
|
PublishScripts/ |
||||
|
|
||||
|
# NuGet Packages |
||||
|
*.nupkg |
||||
|
# NuGet Symbol Packages |
||||
|
*.snupkg |
||||
|
# The packages folder can be ignored because of Package Restore |
||||
|
**/[Pp]ackages/* |
||||
|
# except build/, which is used as an MSBuild target. |
||||
|
!**/[Pp]ackages/build/ |
||||
|
# Uncomment if necessary however generally it will be regenerated when needed |
||||
|
#!**/[Pp]ackages/repositories.config |
||||
|
# NuGet v3's project.json files produces more ignorable files |
||||
|
*.nuget.props |
||||
|
*.nuget.targets |
||||
|
|
||||
|
# Microsoft Azure Build Output |
||||
|
csx/ |
||||
|
*.build.csdef |
||||
|
|
||||
|
# Microsoft Azure Emulator |
||||
|
ecf/ |
||||
|
rcf/ |
||||
|
|
||||
|
# Windows Store app package directories and files |
||||
|
AppPackages/ |
||||
|
BundleArtifacts/ |
||||
|
Package.StoreAssociation.xml |
||||
|
_pkginfo.txt |
||||
|
*.appx |
||||
|
*.appxbundle |
||||
|
*.appxupload |
||||
|
|
||||
|
# Visual Studio cache files |
||||
|
# files ending in .cache can be ignored |
||||
|
*.[Cc]ache |
||||
|
# but keep track of directories ending in .cache |
||||
|
!?*.[Cc]ache/ |
||||
|
|
||||
|
# Others |
||||
|
ClientBin/ |
||||
|
~$* |
||||
|
*~ |
||||
|
*.dbmdl |
||||
|
*.dbproj.schemaview |
||||
|
*.jfm |
||||
|
*.pfx |
||||
|
*.publishsettings |
||||
|
orleans.codegen.cs |
||||
|
|
||||
|
# Including strong name files can present a security risk |
||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424) |
||||
|
#*.snk |
||||
|
|
||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components |
||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) |
||||
|
#bower_components/ |
||||
|
|
||||
|
# RIA/Silverlight projects |
||||
|
Generated_Code/ |
||||
|
|
||||
|
# Backup & report files from converting an old project file |
||||
|
# to a newer Visual Studio version. Backup files are not needed, |
||||
|
# because we have git ;-) |
||||
|
_UpgradeReport_Files/ |
||||
|
Backup*/ |
||||
|
UpgradeLog*.XML |
||||
|
UpgradeLog*.htm |
||||
|
ServiceFabricBackup/ |
||||
|
*.rptproj.bak |
||||
|
|
||||
|
# SQL Server files |
||||
|
*.mdf |
||||
|
*.ldf |
||||
|
*.ndf |
||||
|
|
||||
|
# Business Intelligence projects |
||||
|
*.rdl.data |
||||
|
*.bim.layout |
||||
|
*.bim_*.settings |
||||
|
*.rptproj.rsuser |
||||
|
*- [Bb]ackup.rdl |
||||
|
*- [Bb]ackup ([0-9]).rdl |
||||
|
*- [Bb]ackup ([0-9][0-9]).rdl |
||||
|
|
||||
|
# Microsoft Fakes |
||||
|
FakesAssemblies/ |
||||
|
|
||||
|
# GhostDoc plugin setting file |
||||
|
*.GhostDoc.xml |
||||
|
|
||||
|
# Node.js Tools for Visual Studio |
||||
|
.ntvs_analysis.dat |
||||
|
node_modules/ |
||||
|
|
||||
|
# Visual Studio 6 build log |
||||
|
*.plg |
||||
|
|
||||
|
# Visual Studio 6 workspace options file |
||||
|
*.opt |
||||
|
|
||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) |
||||
|
*.vbw |
||||
|
|
||||
|
# Visual Studio LightSwitch build output |
||||
|
**/*.HTMLClient/GeneratedArtifacts |
||||
|
**/*.DesktopClient/GeneratedArtifacts |
||||
|
**/*.DesktopClient/ModelManifest.xml |
||||
|
**/*.Server/GeneratedArtifacts |
||||
|
**/*.Server/ModelManifest.xml |
||||
|
_Pvt_Extensions |
||||
|
|
||||
|
# Paket dependency manager |
||||
|
.paket/paket.exe |
||||
|
paket-files/ |
||||
|
|
||||
|
# FAKE - F# Make |
||||
|
.fake/ |
||||
|
|
||||
|
# CodeRush personal settings |
||||
|
.cr/personal |
||||
|
|
||||
|
# Python Tools for Visual Studio (PTVS) |
||||
|
__pycache__/ |
||||
|
*.pyc |
||||
|
|
||||
|
# Cake - Uncomment if you are using it |
||||
|
# tools/** |
||||
|
# !tools/packages.config |
||||
|
|
||||
|
# Tabs Studio |
||||
|
*.tss |
||||
|
|
||||
|
# Telerik's JustMock configuration file |
||||
|
*.jmconfig |
||||
|
|
||||
|
# BizTalk build output |
||||
|
*.btp.cs |
||||
|
*.btm.cs |
||||
|
*.odx.cs |
||||
|
*.xsd.cs |
||||
|
|
||||
|
# OpenCover UI analysis results |
||||
|
OpenCover/ |
||||
|
|
||||
|
# Azure Stream Analytics local run output |
||||
|
ASALocalRun/ |
||||
|
|
||||
|
# MSBuild Binary and Structured Log |
||||
|
*.binlog |
||||
|
|
||||
|
# NVidia Nsight GPU debugger configuration file |
||||
|
*.nvuser |
||||
|
|
||||
|
# MFractors (Xamarin productivity tool) working folder |
||||
|
.mfractor/ |
||||
|
|
||||
|
# Local History for Visual Studio |
||||
|
.localhistory/ |
||||
|
|
||||
|
# BeatPulse healthcheck temp database |
||||
|
healthchecksdb |
||||
|
|
||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017 |
||||
|
MigrationBackup/ |
||||
|
|
||||
|
# End of https://www.gitignore.io/api/visualstudio |
||||
|
/CitizenINFC/bin/Debug/CitizenINFC.dll |
||||
|
/CitizenINFC/bin/Debug/CitizenINFC.dll.config |
||||
|
/CitizenINFC/bin/Debug/CitizenINFC.pdb |
||||
|
/CitizenINFC/obj/Debug/CitizenINFC.csproj.CoreCompileInputs.cache |
||||
|
/CitizenINFC/obj/Debug/CitizenINFC.csproj.FileListAbsolute.txt |
||||
|
/CitizenINFC/obj/Debug/CitizenINFC.csprojAssemblyReference.cache |
||||
|
/CitizenINFC/obj/Debug/CitizenINFC.dll |
||||
|
/CitizenINFC/obj/Debug/CitizenINFC.pdb |
||||
|
/CivilBankPayAPI/bin/Debug/CivilBankPayAPI.dll |
||||
|
/CivilBankPayAPI/bin/Debug/CivilBankPayAPI.dll.config |
||||
|
/CivilBankPayAPI/bin/Debug/CivilBankPayAPI.pdb |
||||
|
/CivilBankPayAPI/obj/Debug/CivilBankPayAPI.csproj.CoreCompileInputs.cache |
||||
|
/CivilBankPayAPI/obj/Debug/CivilBankPayAPI.csproj.FileListAbsolute.txt |
||||
|
/CivilBankPayAPI/obj/Debug/CivilBankPayAPI.csprojAssemblyReference.cache |
||||
|
/CivilBankPayAPI/obj/Debug/CivilBankPayAPI.dll |
||||
|
/CivilBankPayAPI/obj/Debug/CivilBankPayAPI.pdb |
||||
|
/EBLPayAPI/bin/Debug/EBLPayAPI.dll |
||||
|
/EBLPayAPI/bin/Debug/EBLPayAPI.dll.config |
||||
|
/EBLPayAPI/bin/Debug/EBLPayAPI.pdb |
||||
|
/EBLPayAPI/obj/Debug/EBLPayAPI.csproj.FileListAbsolute.txt |
||||
|
/EBLPayAPI/obj/Debug/EBLPayAPI.dll |
||||
|
/EBLPayAPI/obj/Debug/EBLPayAPI.pdb |
||||
|
/GlobalTranFastPayAPI/bin/Debug/GlobalTranFastPayAPI.dll |
||||
|
/GlobalTranFastPayAPI/bin/Debug/GlobalTranFastPayAPI.dll.config |
||||
|
/GlobalTranFastPayAPI/bin/Debug/GlobalTranFastPayAPI.pdb |
||||
|
/GlobalTranFastPayAPI/obj/Debug/GlobalTranFastPayAPI.csproj.FileListAbsolute.txt |
||||
|
/GlobalTranFastPayAPI/obj/Debug/GlobalTranFastPayAPI.dll |
||||
|
/GlobalTranFastPayAPI/obj/Debug/GlobalTranFastPayAPI.pdb |
||||
|
/GMEPayAPI/bin/Debug/GMEPayAPI.dll |
||||
|
/GMEPayAPI/bin/Debug/GMEPayAPI.dll.config |
||||
|
/GMEPayAPI/bin/Debug/GMEPayAPI.pdb |
||||
|
/GMEPayAPI/obj/Debug/GMEPayAPI.csproj.FileListAbsolute.txt |
||||
|
/GMEPayAPI/obj/Debug/GMEPayAPI.dll |
||||
|
/GMEPayAPI/obj/Debug/GMEPayAPI.pdb |
||||
|
/IntelExpressPayAPI/bin/Debug/IntelExpressPayAPI.dll |
||||
|
/IntelExpressPayAPI/bin/Debug/IntelExpressPayAPI.dll.config |
||||
|
/IntelExpressPayAPI/bin/Debug/IntelExpressPayAPI.pdb |
||||
|
/IntelExpressPayAPI/obj/Debug/IntelExpressPayAPI.csproj.FileListAbsolute.txt |
||||
|
/IntelExpressPayAPI/obj/Debug/IntelExpressPayAPI.dll |
||||
|
/IntelExpressPayAPI/obj/Debug/IntelExpressPayAPI.pdb |
||||
|
/JanataBankAPI/bin/Debug/JanataBankAPI.dll |
||||
|
/JanataBankAPI/bin/Debug/JanataBankAPI.dll.config |
||||
|
/JanataBankAPI/bin/Debug/JanataBankAPI.pdb |
||||
|
/JanataBankAPI/obj/Debug/JanataBankAPI.csproj.FileListAbsolute.txt |
||||
|
/JanataBankAPI/obj/Debug/JanataBankAPI.dll |
||||
|
/JanataBankAPI/obj/Debug/JanataBankAPI.pdb |
||||
|
/JMEPAYAPI/bin/Debug/JMEPAYAPI.dll |
||||
|
/JMEPAYAPI/bin/Debug/JMEPAYAPI.pdb |
||||
|
/JMEPAYAPI/obj/Debug/JMEPAYAPI.csproj.FileListAbsolute.txt |
||||
|
/JMEPAYAPI/obj/Debug/JMEPAYAPI.dll |
||||
|
/JMEPAYAPI/obj/Debug/JMEPAYAPI.pdb |
||||
|
/LumbiniBankAPI/bin/Debug/LumbiniBankAPI.dll |
||||
|
/LumbiniBankAPI/bin/Debug/LumbiniBankAPI.dll.config |
||||
|
/LumbiniBankAPI/bin/Debug/LumbiniBankAPI.pdb |
||||
|
/LumbiniBankAPI/obj/Debug/LumbiniBankAPI.csproj.FileListAbsolute.txt |
||||
|
/LumbiniBankAPI/obj/Debug/LumbiniBankAPI.dll |
||||
|
/LumbiniBankAPI/obj/Debug/LumbiniBankAPI.pdb |
||||
|
/MachhapuchhrePayAPI/bin/Debug/MachhapuchhrePayAPI.dll |
||||
|
/MachhapuchhrePayAPI/bin/Debug/MachhapuchhrePayAPI.dll.config |
||||
|
/MachhapuchhrePayAPI/bin/Debug/MachhapuchhrePayAPI.pdb |
||||
|
/MachhapuchhrePayAPI/obj/Debug/MachhapuchhrePayAPI.csproj.FileListAbsolute.txt |
||||
|
/MachhapuchhrePayAPI/obj/Debug/MachhapuchhrePayAPI.dll |
||||
|
/MachhapuchhrePayAPI/obj/Debug/MachhapuchhrePayAPI.pdb |
||||
|
/MaxPayAPI/bin/Debug/MaxPayAPI.dll |
||||
|
/MaxPayAPI/bin/Debug/MaxPayAPI.dll.config |
||||
|
/MaxPayAPI/bin/Debug/MaxPayAPI.pdb |
||||
|
/MaxPayAPI/obj/Debug/MaxPayAPI.csproj.FileListAbsolute.txt |
||||
|
/MaxPayAPI/obj/Debug/MaxPayAPI.dll |
||||
|
/MaxPayAPI/obj/Debug/MaxPayAPI.pdb |
||||
|
/MegaBankPayAPI/bin/Debug/MegaBankPayAPI.dll |
||||
|
/MegaBankPayAPI/bin/Debug/MegaBankPayAPI.dll.config |
||||
|
/MegaBankPayAPI/bin/Debug/MegaBankPayAPI.pdb |
||||
|
/MegaBankPayAPI/obj/Debug/MegaBankPayAPI.csproj.FileListAbsolute.txt |
||||
|
/MegaBankPayAPI/obj/Debug/MegaBankPayAPI.dll |
||||
|
/MegaBankPayAPI/obj/Debug/MegaBankPayAPI.pdb |
||||
|
/MoneyGramPayAPI/bin/Debug/MoneyGramPayAPI.dll |
||||
|
/MoneyGramPayAPI/bin/Debug/MoneyGramPayAPI.dll.config |
||||
|
/MoneyGramPayAPI/bin/Debug/MoneyGramPayAPI.pdb |
||||
|
/MoneyGramPayAPI/obj/Debug/MoneyGramPayAPI.csproj.FileListAbsolute.txt |
||||
|
/MoneyGramPayAPI/obj/Debug/MoneyGramPayAPI.dll |
||||
|
/MoneyGramPayAPI/obj/Debug/MoneyGramPayAPI.pdb |
||||
|
/NCHLAPI/bin/Debug/ClassLibrary1.dll |
||||
|
/NCHLAPI/bin/Debug/ClassLibrary1.pdb |
||||
|
/NCHLAPI/obj/Debug/ClassLibrary1.dll |
||||
|
/NCHLAPI/obj/Debug/ClassLibrary1.pdb |
||||
|
/NCHLAPI/obj/Debug/NCHLAPI.csproj.CoreCompileInputs.cache |
||||
|
/NCHLAPI/obj/Debug/NCHLAPI.csproj.FileListAbsolute.txt |
||||
|
/NCHLAPI/obj/Debug/NCHLAPI.csprojAssemblyReference.cache |
||||
|
/NIBLPayAPI/bin/Debug/NIBLPayAPI.dll |
||||
|
/NIBLPayAPI/bin/Debug/NIBLPayAPI.dll.config |
||||
|
/NIBLPayAPI/bin/Debug/NIBLPayAPI.pdb |
||||
|
/NIBLPayAPI/obj/Debug/NIBLPayAPI.csproj.FileListAbsolute.txt |
||||
|
/NIBLPayAPI/obj/Debug/NIBLPayAPI.dll |
||||
|
/NIBLPayAPI/obj/Debug/NIBLPayAPI.pdb |
||||
|
/PlacidAPI/bin/Debug/PlacidAPI.dll |
||||
|
/PlacidAPI/bin/Debug/PlacidAPI.dll.config |
||||
|
/PlacidAPI/bin/Debug/PlacidAPI.pdb |
||||
|
/PlacidAPI/obj/Debug/PlacidAPI.csproj.CoreCompileInputs.cache |
||||
|
/PlacidAPI/obj/Debug/PlacidAPI.csproj.FileListAbsolute.txt |
||||
|
/PlacidAPI/obj/Debug/PlacidAPI.dll |
||||
|
/PlacidAPI/obj/Debug/PlacidAPI.pdb |
||||
|
/ReliableRemitPayAPI/bin/Debug/ReliableRemitPayAPI.dll |
||||
|
/ReliableRemitPayAPI/bin/Debug/ReliableRemitPayAPI.dll.config |
||||
|
/ReliableRemitPayAPI/bin/Debug/ReliableRemitPayAPI.pdb |
||||
|
/ReliableRemitPayAPI/obj/Debug/ReliableRemitPayAPI.csproj.FileListAbsolute.txt |
||||
|
/ReliableRemitPayAPI/obj/Debug/ReliableRemitPayAPI.dll |
||||
|
/ReliableRemitPayAPI/obj/Debug/ReliableRemitPayAPI.pdb |
||||
|
/RIAPayAPI/bin/Debug/RIAPayAPI.dll |
||||
|
/RIAPayAPI/bin/Debug/RIAPayAPI.dll.config |
||||
|
/RIAPayAPI/bin/Debug/RIAPayAPI.pdb |
||||
|
/RIAPayAPI/obj/Debug/RIAPayAPI.csproj.FileListAbsolute.txt |
||||
|
/RIAPayAPI/obj/Debug/RIAPayAPI.dll |
||||
|
/RIAPayAPI/obj/Debug/RIAPayAPI.pdb |
||||
|
/SANIMAPayAPI/bin/Debug/SANIMAPayAPI.dll |
||||
|
/SANIMAPayAPI/bin/Debug/SANIMAPayAPI.dll.config |
||||
|
/SANIMAPayAPI/bin/Debug/SANIMAPayAPI.pdb |
||||
|
/SANIMAPayAPI/obj/Debug/SANIMAPayAPI.csproj.FileListAbsolute.txt |
||||
|
/SANIMAPayAPI/obj/Debug/SANIMAPayAPI.dll |
||||
|
/SANIMAPayAPI/obj/Debug/SANIMAPayAPI.pdb |
||||
|
/ShakaPayAPI/bin/Debug/ShakaPayAPI.dll |
||||
|
/ShakaPayAPI/bin/Debug/ShakaPayAPI.dll.config |
||||
|
/ShakaPayAPI/bin/Debug/ShakaPayAPI.pdb |
||||
|
/ShakaPayAPI/obj/Debug/ShakaPayAPI.csproj.FileListAbsolute.txt |
||||
|
/ShakaPayAPI/obj/Debug/ShakaPayAPI.dll |
||||
|
/ShakaPayAPI/obj/Debug/ShakaPayAPI.pdb |
||||
|
/SunmanGlobalPayAPI/bin/Debug/SunmanGlobalPayAPI.dll |
||||
|
/SunmanGlobalPayAPI/bin/Debug/SunmanGlobalPayAPI.dll.config |
||||
|
/SunmanGlobalPayAPI/bin/Debug/SunmanGlobalPayAPI.pdb |
||||
|
/SunmanGlobalPayAPI/obj/Debug/SunmanGlobalPayAPI.csproj.FileListAbsolute.txt |
||||
|
/SunmanGlobalPayAPI/obj/Debug/SunmanGlobalPayAPI.dll |
||||
|
/SunmanGlobalPayAPI/obj/Debug/SunmanGlobalPayAPI.pdb |
||||
|
/SunrisePayAPI/bin/Debug/SunrisePayAPI.dll |
||||
|
/SunrisePayAPI/obj/Debug/SunrisePayAPI.dll |
||||
|
/Swift.DAL/bin/Debug/MaxPayAPI.dll |
||||
|
/Swift.DAL/bin/Debug/MaxPayAPI.pdb |
||||
|
/Swift.DAL/bin/Debug/SANIMAPayAPI.dll |
||||
|
/Swift.DAL/bin/Debug/SANIMAPayAPI.pdb |
||||
|
/Swift.DAL/bin/Debug/ShakaPayAPI.dll |
||||
|
/Swift.DAL/bin/Debug/ShakaPayAPI.pdb |
||||
|
/Swift.DAL/bin/Debug/Swift.DAL.dll |
||||
|
/Swift.DAL/bin/Debug/Swift.DAL.pdb |
||||
|
/Swift.DAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache |
||||
|
/Swift.DAL/obj/Debug/Swift.DAL.csproj.FileListAbsolute.txt |
||||
|
/Swift.DAL/obj/Debug/Swift.DAL.dll |
||||
|
/Swift.DAL/obj/Debug/Swift.DAL.pdb |
||||
|
/Swift.web/bin/MaxPayAPI.dll |
||||
|
/Swift.web/bin/MaxPayAPI.pdb |
||||
|
/Swift.web/bin/ShakaPayAPI.dll |
||||
|
/Swift.web/bin/ShakaPayAPI.pdb |
||||
|
/Swift.web/bin/Swift.DAL.dll |
||||
|
/Swift.web/bin/Swift.DAL.pdb |
||||
|
/Swift.web/bin/Swift.web.dll |
||||
|
/Swift.web/bin/Swift.web.pdb |
||||
|
/Swift.web/obj/Debug/Interop.CERTENROLLLib.dll |
||||
|
/Swift.web/obj/Debug/Swift.web.csproj.FileListAbsolute.txt |
||||
|
/Swift.web/obj/Debug/Swift.web.csproj.ResolveComReference.cache |
||||
|
/Swift.web/obj/Debug/Swift.web.dll |
||||
|
/Swift.web/obj/Debug/Swift.web.pdb |
||||
|
/TMLPayAPI/bin/Debug/TMLPayAPI.dll |
||||
|
/TMLPayAPI/bin/Debug/TMLPayAPI.dll.config |
||||
|
/TMLPayAPI/bin/Debug/TMLPayAPI.pdb |
||||
|
/TMLPayAPI/obj/Debug/TMLPayAPI.csproj.FileListAbsolute.txt |
||||
|
/TMLPayAPI/obj/Debug/TMLPayAPI.dll |
||||
|
/TMLPayAPI/obj/Debug/TMLPayAPI.pdb |
||||
|
/TranFastPayAPI/bin/Debug/TranFastPayAPI.dll |
||||
|
/TranFastPayAPI/bin/Debug/TranFastPayAPI.pdb |
||||
|
/TranFastPayAPI/obj/Debug/TranFastPayAPI.csproj.FileListAbsolute.txt |
||||
|
/TranFastPayAPI/obj/Debug/TranFastPayAPI.dll |
||||
|
/TranFastPayAPI/obj/Debug/TranFastPayAPI.pdb |
||||
|
/XpressMoneySendAPI/bin/Debug/XpressMoneySendAPI.dll |
||||
|
/XpressMoneySendAPI/bin/Debug/XpressMoneySendAPI.dll.config |
||||
|
/XpressMoneySendAPI/bin/Debug/XpressMoneySendAPI.pdb |
||||
|
/XpressMoneySendAPI/obj/Debug/XpressMoneySendAPI.csproj.CoreCompileInputs.cache |
||||
|
/XpressMoneySendAPI/obj/Debug/XpressMoneySendAPI.csproj.FileListAbsolute.txt |
||||
|
/XpressMoneySendAPI/obj/Debug/XpressMoneySendAPI.dll |
||||
|
/XpressMoneySendAPI/obj/Debug/XpressMoneySendAPI.pdb |
||||
|
/YesRemit_TranFast/bin/Debug/YesRemit_TranFast.dll |
||||
|
/YesRemit_TranFast/bin/Debug/YesRemit_TranFast.dll.config |
||||
|
/YesRemit_TranFast/bin/Debug/YesRemit_TranFast.pdb |
||||
|
/YesRemit_TranFast/obj/Debug/YesRemit_TranFast.csproj.FileListAbsolute.txt |
||||
|
/YesRemit_TranFast/obj/Debug/YesRemit_TranFast.dll |
||||
|
/YesRemit_TranFast/obj/Debug/YesRemit_TranFast.pdb |
||||
|
/Swift.web/web.config |
@ -0,0 +1,25 @@ |
|||||
|
|
||||
|
Microsoft Visual Studio Solution File, Format Version 12.00 |
||||
|
# Visual Studio 15 |
||||
|
VisualStudioVersion = 15.0.26430.15 |
||||
|
MinimumVisualStudioVersion = 10.0.40219.1 |
||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JMETxnPushScheduler", "SendMail\JMETxnPushScheduler.csproj", "{5AC9671D-FB0E-4816-A870-886006FC5C19}" |
||||
|
EndProject |
||||
|
Global |
||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
|
Debug|Any CPU = Debug|Any CPU |
||||
|
Release|Any CPU = Release|Any CPU |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
|
{5AC9671D-FB0E-4816-A870-886006FC5C19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{5AC9671D-FB0E-4816-A870-886006FC5C19}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{5AC9671D-FB0E-4816-A870-886006FC5C19}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{5AC9671D-FB0E-4816-A870-886006FC5C19}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
EndGlobalSection |
||||
|
GlobalSection(SolutionProperties) = preSolution |
||||
|
HideSolutionNode = FALSE |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ExtensibilityGlobals) = postSolution |
||||
|
SolutionGuid = {11FF4A29-1BB1-4188-BF7D-472867DD4CAC} |
||||
|
EndGlobalSection |
||||
|
EndGlobal |
@ -0,0 +1,22 @@ |
|||||
|
using JMETxnPushScheduler.Business; |
||||
|
using System; |
||||
|
using System.Net.Http; |
||||
|
using System.Net.Http.Headers; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.API |
||||
|
{ |
||||
|
public class RestApiClient |
||||
|
{ |
||||
|
private static int timeOut = 100;//Convert.ToInt16(ConfigurationManager.AppSettings["ApiTimeOutSeconds"]);
|
||||
|
public static HttpClient CallJMEThirdParty() |
||||
|
{ |
||||
|
string thirdPartyUrl = GetStatic.ReadWebConfig("JMECoreAPIURL", ""); |
||||
|
var httpClient = new HttpClient(); |
||||
|
httpClient.BaseAddress = new Uri(thirdPartyUrl); |
||||
|
httpClient.DefaultRequestHeaders.Add("apiAccessKey", GetStatic.ReadWebConfig("JMECoreAPI_HeaderToken", "")); |
||||
|
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); |
||||
|
httpClient.Timeout = new TimeSpan(0, 0, timeOut); |
||||
|
return httpClient; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,120 @@ |
|||||
|
using Newtonsoft.Json; |
||||
|
using JMETxnPushScheduler.Common; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Net.Http; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.API |
||||
|
{ |
||||
|
public class SendTransactionServices |
||||
|
{ |
||||
|
public JsonResponse SendTransaction(SendTransactionRequest model) |
||||
|
{ |
||||
|
//Log.Debug("Calculate | Calling third party api to fetch the ex-rate details " + JsonConvert.SerializeObject(model));
|
||||
|
using (var client = RestApiClient.CallJMEThirdParty()) |
||||
|
{ |
||||
|
JsonResponse jsonResponse = new JsonResponse(); |
||||
|
var obj = JsonConvert.SerializeObject(model); |
||||
|
var jbdContent = new StringContent(obj.ToString(), Encoding.UTF8, "application/json"); |
||||
|
try |
||||
|
{ |
||||
|
var URL = "api/v1/TP/sendTxn"; |
||||
|
|
||||
|
HttpResponseMessage resp = client.PostAsync(URL, jbdContent).Result; |
||||
|
string resultData = resp.Content.ReadAsStringAsync().Result; |
||||
|
if (resp.IsSuccessStatusCode) |
||||
|
{ |
||||
|
jsonResponse = JsonConvert.DeserializeObject<JsonResponse>(resultData); |
||||
|
if (jsonResponse.ResponseCode.Equals("104")) |
||||
|
{ |
||||
|
var datas = JsonConvert.DeserializeObject<List<Data>>(jsonResponse.Data.ToString()); |
||||
|
string msg = ""; |
||||
|
foreach (var item in datas) |
||||
|
{ |
||||
|
msg += " " + item.Message; |
||||
|
} |
||||
|
jsonResponse.Msg += msg; |
||||
|
} |
||||
|
return jsonResponse; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var errorJson = JsonConvert.DeserializeObject<ErrorJosn>(resultData); |
||||
|
var jsonResponseData = JsonConvert.DeserializeObject<JsonResponse>(errorJson.Message); |
||||
|
var data = JsonConvert.DeserializeObject<List<Data>>(jsonResponseData.Data.ToString()); |
||||
|
jsonResponse.Id = jsonResponseData.Id; |
||||
|
jsonResponse.ResponseCode = jsonResponseData.ResponseCode; |
||||
|
jsonResponse.Msg = jsonResponseData.Msg; |
||||
|
jsonResponse.Data = data; |
||||
|
jsonResponse.Extra = jsonResponseData.Extra; |
||||
|
jsonResponse.Extra1 = jsonResponseData.Extra1; |
||||
|
return jsonResponse; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
return new JsonResponse() |
||||
|
{ |
||||
|
ResponseCode = "1", |
||||
|
Msg = (ex.InnerException == null ? ex.Message : ex.InnerException.Message) |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public JsonResponse ReleaseTransaction(TFReleaseTxnRequest model) |
||||
|
{ |
||||
|
//Log.Debug("Calculate | Calling third party api to fetch the ex-rate details " + JsonConvert.SerializeObject(model));
|
||||
|
using (var client = RestApiClient.CallJMEThirdParty()) |
||||
|
{ |
||||
|
JsonResponse jsonResponse = new JsonResponse(); |
||||
|
var obj = JsonConvert.SerializeObject(model); |
||||
|
var jbdContent = new StringContent(obj.ToString(), Encoding.UTF8, "application/json"); |
||||
|
try |
||||
|
{ |
||||
|
var URL = "api/v1/TP/releaseTxn"; |
||||
|
|
||||
|
HttpResponseMessage resp = client.PostAsync(URL, jbdContent).Result; |
||||
|
string resultData = resp.Content.ReadAsStringAsync().Result; |
||||
|
if (resp.IsSuccessStatusCode) |
||||
|
{ |
||||
|
jsonResponse = JsonConvert.DeserializeObject<JsonResponse>(resultData); |
||||
|
if (jsonResponse.ResponseCode.Equals("104")) |
||||
|
{ |
||||
|
var datas = JsonConvert.DeserializeObject<List<Data>>(jsonResponse.Data.ToString()); |
||||
|
string msg = ""; |
||||
|
foreach (var item in datas) |
||||
|
{ |
||||
|
msg += " " + item.Message; |
||||
|
} |
||||
|
jsonResponse.Msg += msg; |
||||
|
} |
||||
|
return jsonResponse; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var errorJson = JsonConvert.DeserializeObject<ErrorJosn>(resultData); |
||||
|
var jsonResponseData = JsonConvert.DeserializeObject<JsonResponse>(errorJson.Message); |
||||
|
var data = JsonConvert.DeserializeObject<List<Data>>(jsonResponseData.Data.ToString()); |
||||
|
jsonResponse.Id = jsonResponseData.Id; |
||||
|
jsonResponse.ResponseCode = jsonResponseData.ResponseCode; |
||||
|
jsonResponse.Msg = jsonResponseData.Msg; |
||||
|
jsonResponse.Data = data; |
||||
|
jsonResponse.Extra = jsonResponseData.Extra; |
||||
|
jsonResponse.Extra1 = jsonResponseData.Extra1; |
||||
|
return jsonResponse; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
return new JsonResponse() |
||||
|
{ |
||||
|
ResponseCode = "1", |
||||
|
Msg = (ex.InnerException == null ? ex.Message : ex.InnerException.Message) |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<configuration> |
||||
|
<startup> |
||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> |
||||
|
</startup> |
||||
|
<connectionStrings> |
||||
|
<!--<add name="Connections" connectionString="server=34.92.161.102;Database=FastMoneyPro_Remit;uid=remituserjme;pwd=r3M!tU5Er@jM3r3Mit#?; Max Pool Size=1000;" providerName="system.data.sqlclient" />--> |
||||
|
<!--<add name="Connections" connectionString="server=10.90.77.61;Database=FastMoneyPro_Remit;uid=remituserjme;pwd=r3M!tU5Er@jM3r3Mit#?; Max Pool Size=1000;" providerName="system.data.sqlclient" />--> |
||||
|
<!--<add name="Connections" connectionString="server=202.166.220.36,1433;Database=FastMoneyPro_Remit;uid=jmeuser;pwd=P@ssw0rd@321!" providerName="system.data.sqlclient" />--> |
||||
|
<add name="Connections" connectionString="server=192.168.53.21\MSSQLSERVER01,9097;Database=FastMoneyPro_Remit;uid=user_stag;pwd=P@ssw0rd; Max Pool Size=1000;" providerName="system.data.sqlclient" /> |
||||
|
|
||||
|
</connectionStrings> |
||||
|
<appSettings> |
||||
|
<!--<add key="JMECoreAPIURL" value="http://10.90.77.51:8081/" />--> |
||||
|
<add key="JMECoreAPIURL" value="http://localhost:65345/" /> |
||||
|
<!--<add key="JMECoreAPIURL" value="http://192.168.53.21:8082/" />--> |
||||
|
<add key="JMECoreAPI_HeaderToken" value="KPb1ttRs3CJnORpVU8SmAKUs7a42vtvjzQ47gU0b4u0vxAEI0PgZref6puzkVhLTX2PRNMGCbnb2TglupsjV5AGhYvw8a8POTcUcFSrEdHmTkhkIGNvUvxSpKjUOXGFQWaGU1bxoqqUSaFOmNE5zGojVmwPoMy38CNLwnpQKjdsIuxCKGCApa2gWHJl9gebmIpUODv9jAZgmMEaXqyR4CLg4iSksfTyYNjdqxEE88P5THYt5GuNk8Ti6K2RxIKfPWY49hBOpiYnXcApgSDiKFYqQG9WuZ7cvDGJIWg5WgWKjGle8Y3OydhONXVkN5OMPXDA4VZkK4c5nM363Zkg4w4qdzWuwhsEoAwU4rej6sMRZue3L0BowBJja1OK0iPoTX70EexX8rviMLOZPUDwhxzkL3eODS69VEEbjHb8WSjhho5h3KnCE4tcqCWihwSZ8Yuyhw1rzIMNw2C8pN1GEJyXc6goIFkf7dmK9ynJSxu52D9GjOkKqoD7dFNFulOFVfgeCuhPDYG2A2c2RSvGHv24VDXvmGVaAMLiPtsTz5oD8f0na7fX1xGg0Qveh0KgQL5THnrMK6gm5Ky7O8nbecIxY" /> |
||||
|
<add key="LogFile" value="D:/Office/SourceCodes/git-repo/JME/Console Jobs/TxnPushJob/SendMail/Logs/log.txt" /> |
||||
|
|
||||
|
</appSettings> |
||||
|
</configuration> |
@ -0,0 +1,47 @@ |
|||||
|
using System; |
||||
|
using System.Configuration; |
||||
|
using System.IO; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.Business |
||||
|
{ |
||||
|
public static class GetStatic |
||||
|
{ |
||||
|
public static string ReadWebConfig(string key, string defValue) |
||||
|
{ |
||||
|
return ConfigurationManager.AppSettings[key] ?? defValue; |
||||
|
} |
||||
|
|
||||
|
public static void WriteLog(string Log) |
||||
|
{ |
||||
|
string LogFile = GetStatic.ReadAppSetting("LogFile"); |
||||
|
StringBuilder LogText = new StringBuilder(); |
||||
|
|
||||
|
LogText.AppendLine(Log + DateTime.Now.ToString()); |
||||
|
LogText.AppendLine("----------------------------------------------------------------------------"); |
||||
|
Write(LogText.ToString()); |
||||
|
|
||||
|
using (StreamWriter writetext = new StreamWriter(LogFile, true)) |
||||
|
{ |
||||
|
writetext.WriteLine(LogText.ToString()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
static void Write(string data) |
||||
|
{ |
||||
|
Console.WriteLine(data); |
||||
|
} |
||||
|
|
||||
|
public static string ReadAppSetting(this string val) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
return ConfigurationSettings.AppSettings[val].ToString(); |
||||
|
} |
||||
|
catch (Exception) |
||||
|
{ |
||||
|
return ""; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
using JMETxnPushScheduler.Repository; |
||||
|
using System; |
||||
|
using System.Data; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.Business |
||||
|
{ |
||||
|
public class SendEmail |
||||
|
{ |
||||
|
|
||||
|
SendRepository _repository = new SendRepository(); |
||||
|
public void mailsend() |
||||
|
{ |
||||
|
int i = 1; |
||||
|
DataTable mailDetails = _repository.GetMailDetails(); |
||||
|
string msgSubject = "About pasword Reset"; |
||||
|
string msgBody = string.Empty; |
||||
|
if (mailDetails == null ) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
else if (mailDetails.Rows.Count == 0) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
try |
||||
|
{ |
||||
|
msgBody = "<html><head><meta content=text/html; charset=utf-8 http-equiv=Content-Type></head><body><table>" + |
||||
|
"<tr><td><b>SNo. </b></td>" + |
||||
|
"<td><b>Full Name</b></td>" + |
||||
|
"<td><b>Email</b></td>" + |
||||
|
"<td><b>User Name</b></td>" + |
||||
|
"<td><b>New Password</b></td>" + |
||||
|
"</tr>"; |
||||
|
foreach (DataRow item in mailDetails.Rows) |
||||
|
{ |
||||
|
|
||||
|
msgBody += "<tr><td>" + Convert.ToString(i ) + "</td>"; |
||||
|
msgBody += "<td>" + item["Name"].ToString() + "</td>"; |
||||
|
msgBody += "<td>" + item["Email"].ToString() + "</td>"; |
||||
|
msgBody += "<td>" + item["UserName"].ToString() + "</td>"; |
||||
|
msgBody += "<td>" + item["Newpassword"].ToString() + "</td>"; |
||||
|
i = i + 1; |
||||
|
} |
||||
|
msgBody += "</table></body></html>"; |
||||
|
SmtpMailSetting mail = new SmtpMailSetting |
||||
|
{ |
||||
|
MsgBody = msgBody, |
||||
|
MsgSubject = msgSubject, |
||||
|
ToEmails = GetStatic.ReadWebConfig("recivermail", "") |
||||
|
}; |
||||
|
string res = mail.SendSmtpMail(mail); |
||||
|
|
||||
|
//if (res != "Mail Send")
|
||||
|
//{
|
||||
|
// ErrorEmail();
|
||||
|
//}
|
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
ex.Message.ToString(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void ErrorEmail() |
||||
|
{ |
||||
|
|
||||
|
_repository.ErrorEmail(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,103 @@ |
|||||
|
using System; |
||||
|
using System.Net.Mail; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.Business |
||||
|
{ |
||||
|
public class SmtpMailSetting |
||||
|
{ |
||||
|
public SmtpMailSetting() |
||||
|
{ |
||||
|
|
||||
|
ToEmails = ""; |
||||
|
CcEmails = ""; |
||||
|
BccEmails = ""; |
||||
|
MsgSubject = ""; |
||||
|
MsgBody = ""; |
||||
|
SmtpPort = Convert.ToInt16(GetStatic.ReadWebConfig("port", "")); |
||||
|
SmtpServer = GetStatic.ReadWebConfig("smtp", ""); |
||||
|
SendEmailId = GetStatic.ReadWebConfig("mailFrom", ""); |
||||
|
SendEmailPwd = GetStatic.ReadWebConfig("pwd", ""); |
||||
|
EnableSsl = true; |
||||
|
} |
||||
|
|
||||
|
public int SmtpPort { get; set; } |
||||
|
public string SmtpServer { get; set; } |
||||
|
public string SendEmailId { get; set; } |
||||
|
public string SendEmailPwd { get; set; } |
||||
|
public string ToEmails { get; set; } |
||||
|
public string CcEmails { get; set; } |
||||
|
public string BccEmails { get; set; } |
||||
|
public string MsgSubject { get; set; } |
||||
|
public string MsgBody { get; set; } |
||||
|
public bool EnableSsl { get; set; } |
||||
|
public string Status { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Send mail through gme SMTP server
|
||||
|
/// </summary>
|
||||
|
/// <param name="smtpMail">receiver details mail body and subject</param>
|
||||
|
/// <returns></returns>
|
||||
|
public string SendSmtpMail(SmtpMailSetting smtpMail) |
||||
|
{ |
||||
|
MailMessage mail = new MailMessage(); |
||||
|
SmtpClient SmtpServer = new SmtpClient(); |
||||
|
try |
||||
|
{ |
||||
|
|
||||
|
SmtpServer.Host = smtpMail.SmtpServer; |
||||
|
SmtpServer.Port = smtpMail.SmtpPort; |
||||
|
SmtpServer.Credentials = new System.Net.NetworkCredential(smtpMail.SendEmailId, smtpMail.SendEmailPwd); |
||||
|
SmtpServer.EnableSsl = EnableSsl; |
||||
|
|
||||
|
mail.From = new MailAddress(smtpMail.SendEmailId); |
||||
|
mail.To.Add(smtpMail.ToEmails); |
||||
|
if (!string.IsNullOrEmpty(smtpMail.CcEmails)) |
||||
|
mail.CC.Add(smtpMail.CcEmails); |
||||
|
if (!string.IsNullOrEmpty(smtpMail.BccEmails)) |
||||
|
mail.Bcc.Add(smtpMail.BccEmails); |
||||
|
|
||||
|
mail.Subject = smtpMail.MsgSubject; |
||||
|
mail.IsBodyHtml = true; |
||||
|
mail.Body = smtpMail.MsgBody; |
||||
|
|
||||
|
SmtpServer.Send(mail); |
||||
|
smtpMail.Status = "Y"; |
||||
|
SmtpServer.Dispose(); |
||||
|
|
||||
|
} |
||||
|
catch (SmtpFailedRecipientsException ex) |
||||
|
{ |
||||
|
for (int i = 0; i < ex.InnerExceptions.Length; i++) |
||||
|
{ |
||||
|
SmtpStatusCode status = ex.InnerExceptions[i].StatusCode; |
||||
|
if (status == SmtpStatusCode.MailboxBusy || status == SmtpStatusCode.MailboxUnavailable) |
||||
|
{ |
||||
|
// Console.WriteLine("Delivery failed - retrying in 5 seconds.");
|
||||
|
System.Threading.Thread.Sleep(5000); |
||||
|
SmtpServer.Send(mail); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// Console.WriteLine("Failed to deliver message to {0}", ex.InnerExceptions[i].FailedRecipient);
|
||||
|
//throw ex;
|
||||
|
smtpMail.Status = "N"; |
||||
|
//GetStatic.EmailNotificationLog(smtpMail);
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
smtpMail.Status = "N"; |
||||
|
//GetStatic.EmailNotificationLog(smtpMail);
|
||||
|
} |
||||
|
finally |
||||
|
{ |
||||
|
SmtpServer.Dispose(); |
||||
|
} |
||||
|
//GetStatic.EmailNotificationLog(smtpMail);
|
||||
|
|
||||
|
return "Mail Send"; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,183 @@ |
|||||
|
using JMETxnPushScheduler.API; |
||||
|
using JMETxnPushScheduler.Common; |
||||
|
using JMETxnPushScheduler.DAO; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Data; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.Business |
||||
|
{ |
||||
|
public class TxnPush |
||||
|
{ |
||||
|
public void TxnSyncMain() |
||||
|
{ |
||||
|
TxnPushDAO _txnPush = new TxnPushDAO(); |
||||
|
DataTable txnData = _txnPush.GetTxnDataForApprove(); |
||||
|
if (txnData.Rows.Count == 0 || null == txnData) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Console.WriteLine("Total data fetched for sync: " + txnData.Rows.Count.ToString()); |
||||
|
foreach (DataRow item in txnData.Rows) |
||||
|
{ |
||||
|
CommonResponse _dbRes = _txnPush.GetTxnApproveData("schedular", item["ID"].ToString()); |
||||
|
if (_dbRes.ResponseCode == "0") |
||||
|
{ |
||||
|
if (_dbRes.Extra == "True")//is realtime
|
||||
|
{ |
||||
|
Console.WriteLine("Release txn started: " + item["CONTROLNO"].ToString()); |
||||
|
SendTransactionServices _tpSend = new SendTransactionServices(); |
||||
|
var result = _tpSend.ReleaseTransaction(new TFReleaseTxnRequest() |
||||
|
{ |
||||
|
TfPin = _dbRes.Id, |
||||
|
RequestBy = "scheduler", |
||||
|
UserName = "scheduler", |
||||
|
ProviderId = _dbRes.Msg |
||||
|
}); |
||||
|
|
||||
|
Console.WriteLine("Release txn completed with response msg: " + result.Msg); |
||||
|
if (result.ResponseCode == "0") |
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Console.WriteLine("Send txn started: " + item["CONTROLNO"].ToString()); |
||||
|
string newSession = Guid.NewGuid().ToString().Replace("-", ""); |
||||
|
var result = _txnPush.GetHoldedTxnForApprovedByAdmin("scheduler", item["ID"].ToString(), newSession); |
||||
|
|
||||
|
Console.WriteLine("Send txn completed with response msg: " + result.Msg); |
||||
|
|
||||
|
List<string> exclude = new List<string>() { "7000", "100" }; |
||||
|
|
||||
|
if (result.ResponseCode != null && result.ResponseCode != "0") |
||||
|
{ |
||||
|
if (!exclude.Contains(result.ResponseCode) || !result.Msg.Contains("task was canceled")) |
||||
|
_txnPush.SyncTxnAsComment(_dbRes.Msg, item["ID"].ToString(), item["CONTROLNO"].ToString(), !string.IsNullOrEmpty(result.Extra) ? result.Extra : result.ResponseCode, result.Msg); |
||||
|
else |
||||
|
Console.WriteLine("SyncTxnAsComment exclude Code: " + result.ResponseCode); |
||||
|
} |
||||
|
|
||||
|
if (_dbRes.Msg == "394397") |
||||
|
{ |
||||
|
if (result.ResponseCode == "0") |
||||
|
{ |
||||
|
_txnPush.UpdateTxnInstantPaid(item["ID"].ToString()); |
||||
|
} |
||||
|
else if (result.ResponseCode == "100")//Transaction has been processed for Bank Deposit.
|
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
else if (result.ResponseCode == "7000" && result.Msg.Contains("ALREADY USED")) |
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
} |
||||
|
else if (_dbRes.Msg == "394132") |
||||
|
{ |
||||
|
if (result.ResponseCode == "0" || (!string.IsNullOrEmpty(result.Extra) && result.Extra.Equals("0006"))) //Duplicate records
|
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
} |
||||
|
else if (_dbRes.Msg == "394414") //brac
|
||||
|
{ |
||||
|
if (result.ResponseCode == "0" || (!string.IsNullOrEmpty(result.Msg) && result.Msg.Equals("DuplicateTTNumber"))) //004- Duplicate records
|
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
} |
||||
|
else if (_dbRes.Msg == "394428") //Cebuana
|
||||
|
{ |
||||
|
if (result.ResponseCode == "0" || (!string.IsNullOrEmpty(result.Extra) && result.Extra.Equals("05"))) // Control Number Already In Use
|
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
else if (!string.IsNullOrEmpty(result.Extra) && result.Extra.Equals("19")) //"RTA Internal Error-Reference Number Already Exists
|
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
else if (_dbRes.Msg == "394434") //wings
|
||||
|
{ |
||||
|
if (result.ResponseCode == "0") |
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
else if (!string.IsNullOrEmpty(result.Extra) && result.Extra.Equals("200")) //" Txn found in wings system.
|
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (result.ResponseCode == "0") |
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
public void TxnReleaseMain() |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
TxnPushDAO _txnPush = new TxnPushDAO(); |
||||
|
DataTable txnData = _txnPush.GetTxnDataForRelease(); |
||||
|
if (txnData.Rows.Count == 0 || null == txnData) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
GetStatic.WriteLog("Total data fetched for Release: " + txnData.Rows.Count.ToString()); |
||||
|
// Console.WriteLine("Total data fetched for Release: " + txnData.Rows.Count.ToString());
|
||||
|
foreach (DataRow item in txnData.Rows) |
||||
|
{ |
||||
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":" + item["partner"].ToString() + ":releaseTxn"; |
||||
|
Console.WriteLine("Release txn started: " + item["CONTROLNO"].ToString()); |
||||
|
SendTransactionServices _tpSend = new SendTransactionServices(); |
||||
|
|
||||
|
var request = new TFReleaseTxnRequest() |
||||
|
{ |
||||
|
TfPin = item["CONTROLNO"].ToString(), |
||||
|
RequestBy = "scheduler", |
||||
|
UserName = "scheduler", |
||||
|
ProviderId = item["sSuperAgent"].ToString(), |
||||
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40) |
||||
|
}; |
||||
|
|
||||
|
GetStatic.WriteLog(item["CONTROLNO"].ToString() + " " + Newtonsoft.Json.JsonConvert.SerializeObject(request)); |
||||
|
|
||||
|
var result = _tpSend.ReleaseTransaction(request); |
||||
|
|
||||
|
Console.WriteLine("Release txn completed with response msg: " + result.Msg); |
||||
|
if (result.ResponseCode == "0") |
||||
|
{ |
||||
|
_txnPush.UpdateTxnPost(item["ID"].ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
GetStatic.WriteLog("Release txn failed with response msg: " + item["CONTROLNO"].ToString() + " " + result.Msg); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
GetStatic.WriteLog("TxnReleaseMain" + ex.ToString()); |
||||
|
|
||||
|
Console.WriteLine(ex.InnerException.ToString()); |
||||
|
Console.Read(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
namespace JMETxnPushScheduler.Common |
||||
|
{ |
||||
|
public class CommonResponse |
||||
|
{ |
||||
|
public string ResponseCode { get; set; } |
||||
|
public string Msg { get; set; } |
||||
|
public string Id { get; set; } |
||||
|
public object Data { get; set; } |
||||
|
public string Extra { get; set; } |
||||
|
public string Extra2 { get; set; } |
||||
|
public string Status { get; set; } |
||||
|
|
||||
|
public void SetResponse(string responseCode, string msg, string id) |
||||
|
{ |
||||
|
ResponseCode = responseCode; |
||||
|
Msg = msg; |
||||
|
Id = id; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class JsonResponse |
||||
|
{ |
||||
|
public string TokenNo { get; set; } |
||||
|
public string ResponseCode { get; set; } |
||||
|
public string Msg { get; set; } |
||||
|
public string Id { get; set; } |
||||
|
public string Extra { get; set; } |
||||
|
public string Extra1 { get; set; } |
||||
|
public object Data { get; set; } |
||||
|
|
||||
|
public void SetResponse(string responseCode, string msg, string id = null, string extra = null, string extra1 = null) |
||||
|
{ |
||||
|
ResponseCode = responseCode; |
||||
|
Msg = msg; |
||||
|
Id = id; |
||||
|
Extra = extra; |
||||
|
Extra1 = extra1; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class ErrorJosn |
||||
|
{ |
||||
|
public string Message { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class Data |
||||
|
{ |
||||
|
public string Name { get; set; } |
||||
|
public string Message { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class TFReleaseTxnRequest |
||||
|
{ |
||||
|
public string TfPin { get; set; } |
||||
|
public string ProcessId { get; set; } |
||||
|
public string UserName { get; set; } |
||||
|
public string ProviderId { get; set; } |
||||
|
public string SessionId { get; set; } |
||||
|
public string RequestBy { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,172 @@ |
|||||
|
namespace JMETxnPushScheduler.Common |
||||
|
{ |
||||
|
public class SendTransactionRequest |
||||
|
{ |
||||
|
public string ProcessId { get; set; } |
||||
|
public string UserName { get; set; } |
||||
|
public string ProviderId { get; set; } |
||||
|
public string SessionId { get; set; } |
||||
|
public string RequestedBy { get; set; } |
||||
|
public string ExRateConfirmId { get; set; } |
||||
|
|
||||
|
public int TranId { get; set; } |
||||
|
|
||||
|
public bool isTxnAlreadyCreated { get; set; } |
||||
|
|
||||
|
#region SenderInformation
|
||||
|
|
||||
|
public TxnSender Sender { get; set; } |
||||
|
|
||||
|
#endregion SenderInformation
|
||||
|
|
||||
|
#region receiveInformtaion
|
||||
|
|
||||
|
public TxnReceiver Receiver { get; set; } |
||||
|
|
||||
|
#endregion receiveInformtaion
|
||||
|
|
||||
|
#region txnInformation
|
||||
|
|
||||
|
public TxnTransaction Transaction { get; set; } |
||||
|
|
||||
|
#endregion txnInformation
|
||||
|
|
||||
|
#region agentInformation
|
||||
|
|
||||
|
public TxnAgent Agent { get; set; } |
||||
|
|
||||
|
#endregion agentInformation
|
||||
|
|
||||
|
public bool IsRealtime { get; set; } |
||||
|
|
||||
|
public string IsManualSc { get; set; } |
||||
|
|
||||
|
public decimal ManualSc { get; set; } |
||||
|
public bool IsApproveTxn { get; set; } |
||||
|
|
||||
|
public bool IsAccValSupported { get; set; } |
||||
|
} |
||||
|
public class TxnAgent |
||||
|
{ |
||||
|
public int SAgentId { get; set; } |
||||
|
public string SAgentName { get; set; } |
||||
|
public int SSuperAgentId { get; set; } |
||||
|
public string SSuperAgentName { get; set; } |
||||
|
public string AgentRefId { get; set; } |
||||
|
public string PBranchId { get; set; } |
||||
|
public string PBranchName { get; set; } |
||||
|
public string PBranchCity { get; set; } |
||||
|
public int PAgentId { get; set; } |
||||
|
public string PAgentName { get; set; } |
||||
|
public int SBranchId { get; set; } |
||||
|
public string SBranchName { get; set; } |
||||
|
public string PBankType { get; set; } |
||||
|
public string PBankId { get; set; } |
||||
|
public string PBankName { get; set; } |
||||
|
public string PBankBranchId { get; set; } |
||||
|
public string PBankBranchName { get; set; } |
||||
|
} |
||||
|
public class TxnTransaction |
||||
|
{ |
||||
|
public string TxnDate { get; set; } |
||||
|
public string JMEControlNo { get; set; } |
||||
|
public string PurposeOfRemittanceName { get; set; } |
||||
|
public string CollectionMode { get; set; } |
||||
|
public int DeliveryMethodId { get; set; } |
||||
|
public string DeliveryMethod { get; set; } |
||||
|
public string PCurr { get; set; } |
||||
|
public string CollCurr { get; set; } |
||||
|
public decimal CAmt { get; set; } |
||||
|
public decimal PAmt { get; set; } |
||||
|
public decimal TAmt { get; set; } |
||||
|
public decimal ServiceCharge { get; set; } |
||||
|
public decimal Discount { get; set; } |
||||
|
public decimal ExRate { get; set; } |
||||
|
public decimal Rate { get; set; } |
||||
|
public string PComm { get; set; } |
||||
|
public decimal SettlementDollarRate { get; set; } |
||||
|
public string CalBy { get; set; } |
||||
|
public string Introducer { get; set; } |
||||
|
public string IsManualSc { get; set; } |
||||
|
public decimal ManualSc { get; set; } |
||||
|
public string RLocation { get; set; } |
||||
|
public string RLocationName { get; set; } |
||||
|
public string TpRefNo { get; set; } |
||||
|
public string TpTranId { get; set; } |
||||
|
public int PayOutPartner { get; set; } |
||||
|
public string PaymentType { get; set; } |
||||
|
public string PayoutMsg { get; set; } |
||||
|
|
||||
|
} |
||||
|
public class TxnReceiver |
||||
|
{ |
||||
|
public string ReceiverId { get; set; } |
||||
|
public string RFullName { get; set; } |
||||
|
public string RFirstName { get; set; } |
||||
|
public string RMiddleName { get; set; } |
||||
|
public string RLastName { get; set; } |
||||
|
public string RIdType { get; set; } |
||||
|
public string RIdNo { get; set; } |
||||
|
public string RIdIssuedDate { get; set; } |
||||
|
public string RIdValidDate { get; set; } |
||||
|
public string RDob { get; set; } |
||||
|
public string RTel { get; set; } |
||||
|
public string RMobile { get; set; } |
||||
|
public string RNativeCountry { get; set; } |
||||
|
public string RCity { get; set; } |
||||
|
public string RAdd1 { get; set; } |
||||
|
public string REmail { get; set; } |
||||
|
public string RAccountNo { get; set; } |
||||
|
public string RGender { get; set; } |
||||
|
public int RCountryId { get; set; } |
||||
|
public string RCountry { get; set; } |
||||
|
public int RelWithSenderId { get; set; } |
||||
|
public string RelWithSenderName { get; set; } |
||||
|
public string RStateId { get; set; } |
||||
|
public string RStateName { get; set; } |
||||
|
public string RCityCode { get; set; } |
||||
|
public string RDistrictCode { get; set; } |
||||
|
public string UnitaryBankAccountNo { get; set; } |
||||
|
public string RLocation { get; set; } |
||||
|
public string RLocationName { get; set; } |
||||
|
} |
||||
|
public class TxnSender |
||||
|
{ |
||||
|
public int CustomerId { get; set; } |
||||
|
public string SFirstName { get; set; } |
||||
|
public string SMiddleName { get; set; } |
||||
|
public string SLastName1 { get; set; } |
||||
|
public string SLastName2 { get; set; } |
||||
|
public string SFullName { get; set; } |
||||
|
public string SIdType { get; set; } |
||||
|
public string SIdNo { get; set; } |
||||
|
public string SIdIssueDate { get; set; } |
||||
|
public string SIdExpiryDate { get; set; } |
||||
|
public int SOccuptionId { get; set; } |
||||
|
public string SOccuptionName { get; set; } |
||||
|
public string SBirthDate { get; set; } |
||||
|
public string SEmail { get; set; } |
||||
|
public string SCityId { get; set; } |
||||
|
public string SCity { get; set; } |
||||
|
public string SState { get; set; } |
||||
|
public string FormOfPaymentId { get; set; } |
||||
|
public string SZipCode { get; set; } |
||||
|
public string SNativeCountry { get; set; } |
||||
|
public string SMobile { get; set; } |
||||
|
public string STel { get; set; } |
||||
|
public string SAddress { get; set; } |
||||
|
public string SIpAddress { get; set; } |
||||
|
public string SGender { get; set; } |
||||
|
public string SCustStreet { get; set; } |
||||
|
public string SCustLocation { get; set; } |
||||
|
public string SourceOfFund { get; set; } |
||||
|
public string Pwd { get; set; } |
||||
|
public bool IsIndividual { get; set; } |
||||
|
public int SCountryId { get; set; } |
||||
|
public string SCountryName { get; set; } |
||||
|
public int SBranchId { get; set; } |
||||
|
public string SBranchName { get; set; } |
||||
|
public int CustomerDepositedBank { get; set; } |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,269 @@ |
|||||
|
using JMETxnPushScheduler.Common; |
||||
|
using System; |
||||
|
using System.Configuration; |
||||
|
using System.Data; |
||||
|
using System.Data.SqlClient; |
||||
|
using System.Text.RegularExpressions; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.DAO |
||||
|
{ |
||||
|
public class SwiftDao |
||||
|
{ |
||||
|
|
||||
|
SqlConnection _connection; |
||||
|
|
||||
|
public SwiftDao() |
||||
|
{ |
||||
|
Init(); |
||||
|
} |
||||
|
|
||||
|
private void Init() |
||||
|
{ |
||||
|
_connection = new SqlConnection(GetConnectionString()); |
||||
|
} |
||||
|
|
||||
|
private string GetConnectionString() |
||||
|
{ |
||||
|
return ConfigurationManager.ConnectionStrings["Connections"].ConnectionString; |
||||
|
} |
||||
|
|
||||
|
private int GetCommandTimeOut() |
||||
|
{ |
||||
|
int cto = 60; |
||||
|
return cto; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void CloseConnection() |
||||
|
{ |
||||
|
if (_connection.State == ConnectionState.Open) |
||||
|
this._connection.Close(); |
||||
|
} |
||||
|
|
||||
|
public CommonResponse ParseDbResultWithSql(string sql) |
||||
|
{ |
||||
|
return ParseDbResult(ExecuteDataTable(sql)); |
||||
|
} |
||||
|
|
||||
|
public CommonResponse ParseDbResult(DataTable dt) |
||||
|
{ |
||||
|
var res = new CommonResponse(); |
||||
|
if (dt.Rows.Count > 0) |
||||
|
{ |
||||
|
res.ResponseCode = dt.Rows[0][0].ToString(); |
||||
|
res.Msg = dt.Rows[0][1].ToString(); |
||||
|
res.Id = dt.Rows[0][2].ToString(); |
||||
|
if (dt.Columns.Count > 3) |
||||
|
{ |
||||
|
res.Extra = dt.Rows[0][3].ToString(); |
||||
|
} |
||||
|
if (dt.Columns.Count > 4) |
||||
|
{ |
||||
|
res.Extra2 = dt.Rows[0][4].ToString(); |
||||
|
} |
||||
|
} |
||||
|
return res; |
||||
|
} |
||||
|
public DataSet ExecuteDataSet(string sql) |
||||
|
{ |
||||
|
var ds = new DataSet(); |
||||
|
using (var con = new SqlConnection(GetConnectionString())) |
||||
|
{ |
||||
|
var cmd = new SqlCommand(sql, con); |
||||
|
cmd.CommandTimeout = GetCommandTimeOut(); |
||||
|
SqlDataAdapter da; |
||||
|
try |
||||
|
{ |
||||
|
da = new SqlDataAdapter(cmd); |
||||
|
da.Fill(ds); |
||||
|
da.Dispose(); |
||||
|
} |
||||
|
|
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw ex; |
||||
|
|
||||
|
} |
||||
|
finally |
||||
|
{ |
||||
|
da = null; |
||||
|
cmd.Dispose(); |
||||
|
} |
||||
|
return ds; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public DataTable ExecuteDataTable(string sql) |
||||
|
{ |
||||
|
using (var ds = ExecuteDataSet(sql)) |
||||
|
{ |
||||
|
if (ds == null || ds.Tables.Count == 0) |
||||
|
return null; |
||||
|
|
||||
|
return ds.Tables[0]; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public DataRow ExecuteDataRow(string sql) |
||||
|
{ |
||||
|
using (var ds = ExecuteDataSet(sql)) |
||||
|
{ |
||||
|
if (ds == null || ds.Tables.Count == 0) |
||||
|
return null; |
||||
|
|
||||
|
if (ds.Tables[0].Rows.Count == 0) |
||||
|
return null; |
||||
|
|
||||
|
return ds.Tables[0].Rows[0]; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
public String FilterString(string strVal) |
||||
|
{ |
||||
|
var str = FilterQuote(strVal); |
||||
|
|
||||
|
if (str.ToLower() != "null") |
||||
|
str = "'" + str + "'"; |
||||
|
|
||||
|
return str.TrimEnd().TrimStart(); |
||||
|
} |
||||
|
|
||||
|
public String FilterXmlString(string strVal) |
||||
|
{ |
||||
|
return "'" + strVal + "'"; |
||||
|
} |
||||
|
|
||||
|
public String FilterXmlNodeString(string strVal) |
||||
|
{ |
||||
|
var str = FilterQuote(strVal); |
||||
|
|
||||
|
return str; |
||||
|
} |
||||
|
|
||||
|
public String FilterQuote(string strVal) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(strVal)) |
||||
|
{ |
||||
|
strVal = ""; |
||||
|
} |
||||
|
var str = strVal.Trim(); |
||||
|
|
||||
|
if (!string.IsNullOrEmpty(str)) |
||||
|
{ |
||||
|
str = str.Replace(";", ""); |
||||
|
str = str.Replace("--", ""); |
||||
|
str = str.Replace("'", ""); |
||||
|
|
||||
|
str = str.Replace("/*", ""); |
||||
|
str = str.Replace("*/", ""); |
||||
|
|
||||
|
str = Regex.Replace(str, " select ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " insert ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " update ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " delete ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " drop ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " truncate ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " create ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " begin ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " end ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " char ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " exec ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
str = Regex.Replace(str, " xp_cmd ", string.Empty, RegexOptions.IgnoreCase); |
||||
|
|
||||
|
str = Regex.Replace(str, @"<.*?>", string.Empty); |
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
str = "null"; |
||||
|
} |
||||
|
return str; |
||||
|
} |
||||
|
|
||||
|
public string ConvertDrToString(object dr) |
||||
|
{ |
||||
|
if (dr != DBNull.Value) |
||||
|
{ |
||||
|
return Convert.ToString(dr); |
||||
|
} |
||||
|
return string.Empty; |
||||
|
} |
||||
|
|
||||
|
public Decimal ConvertDrToDecimal(object dr) |
||||
|
{ |
||||
|
if (dr != DBNull.Value) |
||||
|
{ |
||||
|
return Convert.ToDecimal(dr.ToString()); |
||||
|
} |
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
public Int64 ConvertDrToInt64(object dr) |
||||
|
{ |
||||
|
if (dr != DBNull.Value) |
||||
|
{ |
||||
|
return Convert.ToInt64(dr.ToString()); |
||||
|
} |
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
public DateTime ConvertDrToDate(object dr) |
||||
|
{ |
||||
|
if (dr != DBNull.Value) |
||||
|
{ |
||||
|
return Convert.ToDateTime(dr.ToString()); |
||||
|
} |
||||
|
return DateTime.MinValue; |
||||
|
} |
||||
|
|
||||
|
public Int16 ConvertDrToInt(object dr) |
||||
|
{ |
||||
|
if (dr != DBNull.Value) |
||||
|
{ |
||||
|
return Convert.ToInt16(dr.ToString()); |
||||
|
} |
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
public string ParseQuote(string val) |
||||
|
{ |
||||
|
return "\"" + val + "\""; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public string AutoSelect(string str1, string str2) |
||||
|
{ |
||||
|
if (str1.ToLower() == str2.ToLower()) |
||||
|
return "selected=\"selected\""; |
||||
|
|
||||
|
return ""; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String GetSingleResult(string sql) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
var ds = ExecuteDataSet(sql); |
||||
|
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
||||
|
return ""; |
||||
|
|
||||
|
return ds.Tables[0].Rows[0][0].ToString(); |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw ex; |
||||
|
} |
||||
|
|
||||
|
finally |
||||
|
{ |
||||
|
CloseConnection(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,282 @@ |
|||||
|
using JMETxnPushScheduler.API; |
||||
|
using JMETxnPushScheduler.Common; |
||||
|
using System; |
||||
|
using System.Data; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.DAO |
||||
|
{ |
||||
|
public class TxnPushDAO : SwiftDao |
||||
|
{ |
||||
|
public DataTable GetTxnDataForApprove() |
||||
|
{ |
||||
|
string sql = "EXEC PROC_TP_TXN_PUSH @FLAG = 'GET-LIST'"; |
||||
|
|
||||
|
return ExecuteDataTable(sql); |
||||
|
} |
||||
|
public DataTable GetTxnDataForRelease() |
||||
|
{ |
||||
|
string sql = "EXEC PROC_TP_TXN_PUSH @FLAG = 'GET-RELEASE-LIST'"; |
||||
|
|
||||
|
return ExecuteDataTable(sql); |
||||
|
} |
||||
|
|
||||
|
public void UpdateTxnPost(string id) |
||||
|
{ |
||||
|
string sql = "EXEC PROC_TP_TXN_PUSH @FLAG = 'UPDATE-POST'"; |
||||
|
sql += ", @TRAN_ID = " + FilterString(id); |
||||
|
|
||||
|
ExecuteDataTable(sql); |
||||
|
} |
||||
|
|
||||
|
public void UpdateTxnInstantPaid(string id) |
||||
|
{ |
||||
|
string sql = "EXEC PROC_TP_TXN_PUSH @FLAG = 'INSTANT-PAID'"; |
||||
|
sql += ", @TRAN_ID = " + FilterString(id); |
||||
|
|
||||
|
ExecuteDataTable(sql); |
||||
|
} |
||||
|
|
||||
|
public CommonResponse GetTxnApproveData(string user, string id) |
||||
|
{ |
||||
|
var sql = "EXEC proc_ApproveHoldedTXN @flag = 'get-info-for-compliance'"; |
||||
|
sql += ", @user = " + FilterString(user); |
||||
|
sql += ", @id = " + FilterString(id); |
||||
|
|
||||
|
return ParseDbResultWithSql(sql); |
||||
|
} |
||||
|
|
||||
|
public void 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"); |
||||
|
ExecuteDataTable(sql); |
||||
|
} |
||||
|
|
||||
|
public JsonResponse GetHoldedTxnForApprovedByAdmin(string user, string id, string sessionId, string callFro = null) |
||||
|
{ |
||||
|
var sql = "EXEC proc_GetHoldedTxnForApprovedByAdminCompliance"; |
||||
|
sql += " @user = " + FilterString(user); |
||||
|
sql += ", @tranId = " + FilterString(id); |
||||
|
sql += ", @callFro = " + FilterString(callFro); |
||||
|
|
||||
|
var drDb = ExecuteDataRow(sql); |
||||
|
if (drDb.Table.Columns.Contains("ErrorCode")) |
||||
|
{ |
||||
|
return new JsonResponse() |
||||
|
{ |
||||
|
ResponseCode = Convert.ToString(drDb["ErrorCode"]), |
||||
|
Msg = Convert.ToString(drDb["msg"]) |
||||
|
}; |
||||
|
} |
||||
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":" + Convert.ToString(drDb["processId"]) + ":sendTxn"; |
||||
|
|
||||
|
SendTransactionRequest sendTxnRequest = new SendTransactionRequest(); |
||||
|
if (drDb.Table.Columns.Contains("exRateConfirmId")) |
||||
|
{ |
||||
|
sendTxnRequest.ExRateConfirmId = drDb["exRateConfirmId"].ToString(); |
||||
|
} |
||||
|
|
||||
|
sendTxnRequest.RequestedBy = "scheduler"; |
||||
|
sendTxnRequest.UserName = user; |
||||
|
sendTxnRequest.ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40); |
||||
|
sendTxnRequest.ProviderId = Convert.ToString(drDb["partnerId"]); |
||||
|
sendTxnRequest.TranId = Convert.ToInt32(drDb["tranId"]); |
||||
|
if (drDb.Table.Columns.Contains("IsRealtime")) |
||||
|
{ |
||||
|
sendTxnRequest.IsRealtime = (drDb["IsRealtime"].ToString() == "Y" ? true : false); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
sendTxnRequest.IsRealtime = false; |
||||
|
} |
||||
|
|
||||
|
#region senderInformation
|
||||
|
|
||||
|
TxnSender txnSender = new TxnSender(); |
||||
|
txnSender.CustomerId = Convert.ToInt32(drDb["customerId"]); |
||||
|
txnSender.SFirstName = Convert.ToString(drDb["sfirstName"]); |
||||
|
txnSender.SMiddleName = Convert.ToString(drDb["smiddleName"]); |
||||
|
txnSender.SLastName1 = Convert.ToString(drDb["slastName1"]); |
||||
|
txnSender.SLastName2 = Convert.ToString(drDb["slastName2"]); |
||||
|
txnSender.SFullName = Convert.ToString(drDb["sfullName"]); |
||||
|
txnSender.SIdIssueDate = Convert.ToString(drDb["sissuedDate"]); |
||||
|
txnSender.SIdExpiryDate = Convert.ToString(drDb["svalidDate"]); |
||||
|
txnSender.SOccuptionId = Convert.ToInt32(drDb["occupationId"]); |
||||
|
txnSender.SOccuptionName = Convert.ToString(drDb["occupationName"]); |
||||
|
txnSender.SBirthDate = Convert.ToString(drDb["sdob"]); |
||||
|
txnSender.SEmail = Convert.ToString(drDb["semail"]); |
||||
|
txnSender.SCityId = Convert.ToString(drDb["scity"]); |
||||
|
if (drDb.Table.Columns.Contains("sstate")) |
||||
|
{ |
||||
|
txnSender.SState = Convert.ToString(drDb["sstate"]); |
||||
|
} |
||||
|
if (drDb.Table.Columns.Contains("formOfPaymentId")) |
||||
|
{ |
||||
|
txnSender.FormOfPaymentId = Convert.ToString(drDb["formOfPaymentId"]); |
||||
|
} |
||||
|
txnSender.SZipCode = Convert.ToString(drDb["szipCode"]); |
||||
|
txnSender.SNativeCountry = Convert.ToString(drDb["snativeCountry"]); |
||||
|
txnSender.SIdType = Convert.ToString(drDb["sidType"]); |
||||
|
txnSender.SIdNo = Convert.ToString(drDb["sidNumber"]); |
||||
|
txnSender.SMobile = Convert.ToString(drDb["smobile"]); |
||||
|
txnSender.SAddress = Convert.ToString(drDb["saddress"]); |
||||
|
txnSender.SIpAddress = Convert.ToString(drDb["ipAddress"]); |
||||
|
txnSender.SCountryId = Convert.ToInt32(drDb["countryId"]); |
||||
|
txnSender.SCountryName = Convert.ToString(drDb["sCountry"]); |
||||
|
if (drDb.Table.Columns.Contains("IsIndividual")) |
||||
|
{ |
||||
|
txnSender.IsIndividual = Convert.ToBoolean(drDb["IsIndividual"]); |
||||
|
} |
||||
|
txnSender.SourceOfFund = Convert.ToString(drDb["sourceOfFund"]); |
||||
|
|
||||
|
sendTxnRequest.Sender = txnSender; |
||||
|
|
||||
|
#endregion senderInformation
|
||||
|
|
||||
|
#region receiverInformation
|
||||
|
|
||||
|
TxnReceiver txnReceiver = new TxnReceiver(); |
||||
|
txnReceiver.ReceiverId = Convert.ToString(drDb["receiverId"]); |
||||
|
txnReceiver.RFullName = Convert.ToString(drDb["rfullName"]); |
||||
|
txnReceiver.RFirstName = Convert.ToString(drDb["rfirstName"]); |
||||
|
txnReceiver.RMiddleName = Convert.ToString(drDb["rmiddleName"]); |
||||
|
txnReceiver.RLastName = Convert.ToString(drDb["rlastName1"]); |
||||
|
txnReceiver.RIdType = Convert.ToString(drDb["ridType"]); |
||||
|
txnReceiver.RIdNo = Convert.ToString(drDb["ridNumber"]); |
||||
|
txnReceiver.RIdValidDate = Convert.ToString(drDb["rvalidDate"]); |
||||
|
txnReceiver.RDob = Convert.ToString(drDb["rdob"]); |
||||
|
txnReceiver.RTel = Convert.ToString(drDb["rhomePhone"]); |
||||
|
txnReceiver.RMobile = Convert.ToString(drDb["rmobile"]); |
||||
|
txnReceiver.RNativeCountry = Convert.ToString(drDb["rnativeCountry"]); |
||||
|
txnReceiver.RCity = Convert.ToString(drDb["rcity"]); |
||||
|
txnReceiver.RAdd1 = Convert.ToString(drDb["raddress"]); |
||||
|
txnReceiver.REmail = Convert.ToString(drDb["remail"]); |
||||
|
txnReceiver.RAccountNo = Convert.ToString(drDb["raccountNo"]); |
||||
|
txnReceiver.RCountry = Convert.ToString(drDb["rcountry"]); |
||||
|
txnReceiver.RCityCode = Convert.ToString(drDb["rcityCode"]); |
||||
|
txnReceiver.RelWithSenderName = Convert.ToString(drDb["relationName"]); |
||||
|
txnReceiver.RStateId = Convert.ToString(drDb["rstate"]); |
||||
|
txnReceiver.RLocation = Convert.ToString(drDb["pBankLocation"]); |
||||
|
txnReceiver.UnitaryBankAccountNo = Convert.ToString(drDb["bankAccountNo"]); |
||||
|
txnReceiver.RelWithSenderName = drDb["relationName"].ToString(); |
||||
|
if (drDb.Table.Columns.Contains("rTownCode")) |
||||
|
{ |
||||
|
txnReceiver.RLocation = Convert.ToString(drDb["rTownCode"]); |
||||
|
} |
||||
|
if (drDb.Table.Columns.Contains("payerId")) |
||||
|
{ |
||||
|
txnReceiver.RLocationName = Convert.ToString(drDb["payerId"]); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
sendTxnRequest.Receiver = txnReceiver; |
||||
|
|
||||
|
#endregion receiverInformation
|
||||
|
|
||||
|
#region txnTransaction
|
||||
|
|
||||
|
TxnTransaction transaction = new TxnTransaction(); |
||||
|
|
||||
|
transaction.PCurr = Convert.ToString(drDb["payoutCurr"]); |
||||
|
transaction.CollCurr = Convert.ToString(drDb["collCurr"]); |
||||
|
transaction.CAmt = Convert.ToDecimal(drDb["cAmt"]); |
||||
|
transaction.PAmt = Convert.ToDecimal(drDb["pAmt"]); |
||||
|
transaction.TAmt = Convert.ToDecimal(drDb["tAmt"]); |
||||
|
transaction.ServiceCharge = Convert.ToDecimal(drDb["serviceCharge"]); |
||||
|
transaction.PComm = Convert.ToString(drDb["pAgentComm"]); |
||||
|
transaction.PaymentType = Convert.ToString(drDb["paymentMethod"]); |
||||
|
transaction.JMEControlNo = Convert.ToString(drDb["controlNo"]); |
||||
|
transaction.PurposeOfRemittanceName = Convert.ToString(drDb["purposeOfRemit"]); |
||||
|
|
||||
|
if (drDb.Table.Columns.Contains("txnDate")) |
||||
|
{ |
||||
|
transaction.TxnDate = Convert.ToString(drDb["txnDate"]); |
||||
|
} |
||||
|
if (drDb.Table.Columns.Contains("ssnno")) |
||||
|
{ |
||||
|
transaction.TpRefNo = Convert.ToString(drDb["ssnno"]); |
||||
|
} |
||||
|
if (drDb.Table.Columns.Contains("exRate")) |
||||
|
{ |
||||
|
transaction.ExRate = Convert.ToDecimal(drDb["exRate"]); |
||||
|
} |
||||
|
if (drDb.Table.Columns.Contains("Rate")) |
||||
|
{ |
||||
|
transaction.Rate = Convert.ToDecimal(drDb["Rate"]); |
||||
|
} |
||||
|
if (drDb.Table.Columns.Contains("SettlementDollarRate")) |
||||
|
{ |
||||
|
transaction.SettlementDollarRate = Convert.ToDecimal(drDb["SettlementDollarRate"]); |
||||
|
} |
||||
|
transaction.PayoutMsg = Convert.ToString(drDb["remarks"]); |
||||
|
|
||||
|
sendTxnRequest.Transaction = transaction; |
||||
|
|
||||
|
#endregion txnTransaction
|
||||
|
|
||||
|
#region agentInformation
|
||||
|
|
||||
|
TxnAgent txnAgent = new TxnAgent(); |
||||
|
txnAgent.PBranchId = Convert.ToString(drDb["branchId"]); |
||||
|
txnAgent.PBranchName = Convert.ToString(drDb["branchName"]); |
||||
|
txnAgent.PBranchCity = Convert.ToString(drDb["city"]); |
||||
|
txnAgent.PAgentId = Convert.ToInt32(drDb["pAgent"] == "" ? null : drDb["pAgent"]); |
||||
|
txnAgent.PAgentName = Convert.ToString(drDb["pAgentName"]); |
||||
|
txnAgent.PBankType = Convert.ToString(drDb["pBankType"]); |
||||
|
txnAgent.PBankId = Convert.ToString(drDb["pBank"]); |
||||
|
txnAgent.PBankName = Convert.ToString(drDb["pBankName"]); |
||||
|
txnAgent.SAgentId = Convert.ToInt32(drDb["sAgent"]); |
||||
|
txnAgent.SAgentName = Convert.ToString(drDb["sAgentName"]); |
||||
|
txnAgent.SSuperAgentId = Convert.ToInt32(drDb["sSuperAgent"]); |
||||
|
if (drDb.Table.Columns.Contains("pBankBranchId")) |
||||
|
{ |
||||
|
txnAgent.PBankBranchId = Convert.ToString(drDb["pBankBranchId"]); |
||||
|
} |
||||
|
txnAgent.SBranchId = Convert.ToInt32(drDb["sBranch"]); |
||||
|
if (drDb.Table.Columns.Contains("pBankBranchName")) |
||||
|
{ |
||||
|
txnAgent.PBankBranchName = Convert.ToString(drDb["pBankBranchName"]); |
||||
|
} |
||||
|
|
||||
|
sendTxnRequest.Agent = txnAgent; |
||||
|
|
||||
|
#endregion agentInformation
|
||||
|
if (drDb.Table.Columns.Contains("isFirstTran")) |
||||
|
{ |
||||
|
sendTxnRequest.isTxnAlreadyCreated = Convert.ToString(drDb["isFirstTran"]) == "Y" ? true : false; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
sendTxnRequest.isTxnAlreadyCreated = true; |
||||
|
} |
||||
|
|
||||
|
sendTxnRequest.IsRealtime = Convert.ToBoolean(drDb["IsRealtime"]); |
||||
|
sendTxnRequest.SessionId = Convert.ToString(Guid.NewGuid()).Replace("-", ""); |
||||
|
if (string.IsNullOrEmpty(sendTxnRequest.SessionId) || string.IsNullOrWhiteSpace(sendTxnRequest.SessionId)) |
||||
|
sendTxnRequest.SessionId = sessionId; |
||||
|
|
||||
|
if (drDb.Table.Columns.Contains("IsAccValSupported") && drDb["IsAccValSupported"] != null) |
||||
|
{ |
||||
|
sendTxnRequest.IsAccValSupported = drDb["IsAccValSupported"].ToString().Equals("1") ? true : false; |
||||
|
} |
||||
|
else |
||||
|
sendTxnRequest.IsAccValSupported = false; |
||||
|
|
||||
|
|
||||
|
SendTransactionServices _tpSend = new SendTransactionServices(); |
||||
|
var result = _tpSend.SendTransaction(sendTxnRequest); |
||||
|
sql = ""; |
||||
|
sql = "EXEC proc_tran_api_call_history "; |
||||
|
sql += " @TRAN_ID =" + FilterString(sendTxnRequest.TranId.ToString()); |
||||
|
sql += ", @REQUESTED_BY =" + FilterString(user); |
||||
|
sql += ", @RESPONSE_CODE =" + FilterString(result.ResponseCode); |
||||
|
sql += ", @RESPONSE_MSG =" + FilterString(result.Msg); |
||||
|
GetSingleResult(sql); |
||||
|
return result; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
||||
|
<PropertyGroup> |
||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
|
<ProjectGuid>{5AC9671D-FB0E-4816-A870-886006FC5C19}</ProjectGuid> |
||||
|
<OutputType>Exe</OutputType> |
||||
|
<RootNamespace>JMETxnPushScheduler</RootNamespace> |
||||
|
<AssemblyName>JMETxnPushScheduler</AssemblyName> |
||||
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
||||
|
<FileAlignment>512</FileAlignment> |
||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
||||
|
<IsWebBootstrapper>false</IsWebBootstrapper> |
||||
|
<PublishUrl>C:\Users\arjun.dhami\Desktop\Apps\Send Txn\</PublishUrl> |
||||
|
<Install>true</Install> |
||||
|
<InstallFrom>Disk</InstallFrom> |
||||
|
<UpdateEnabled>false</UpdateEnabled> |
||||
|
<UpdateMode>Foreground</UpdateMode> |
||||
|
<UpdateInterval>7</UpdateInterval> |
||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
||||
|
<UpdatePeriodically>false</UpdatePeriodically> |
||||
|
<UpdateRequired>false</UpdateRequired> |
||||
|
<MapFileExtensions>true</MapFileExtensions> |
||||
|
<ApplicationRevision>12</ApplicationRevision> |
||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
||||
|
<UseApplicationTrust>false</UseApplicationTrust> |
||||
|
<PublishWizardCompleted>true</PublishWizardCompleted> |
||||
|
<BootstrapperEnabled>true</BootstrapperEnabled> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
||||
|
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
|
<DebugSymbols>true</DebugSymbols> |
||||
|
<DebugType>full</DebugType> |
||||
|
<Optimize>false</Optimize> |
||||
|
<OutputPath>bin\Debug\</OutputPath> |
||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
|
<ErrorReport>prompt</ErrorReport> |
||||
|
<WarningLevel>4</WarningLevel> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
||||
|
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
|
<DebugType>pdbonly</DebugType> |
||||
|
<Optimize>true</Optimize> |
||||
|
<OutputPath>bin\Release\</OutputPath> |
||||
|
<DefineConstants>TRACE</DefineConstants> |
||||
|
<ErrorReport>prompt</ErrorReport> |
||||
|
<WarningLevel>4</WarningLevel> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup> |
||||
|
<ManifestCertificateThumbprint>EED1B4A014BB3869A82F39672A96B4BB6A715387</ManifestCertificateThumbprint> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup> |
||||
|
<ManifestKeyFile>JMETxnPushScheduler_TemporaryKey.pfx</ManifestKeyFile> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup> |
||||
|
<GenerateManifests>true</GenerateManifests> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup> |
||||
|
<SignManifests>false</SignManifests> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup> |
||||
|
<SignAssembly>false</SignAssembly> |
||||
|
</PropertyGroup> |
||||
|
<ItemGroup> |
||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> |
||||
|
</Reference> |
||||
|
<Reference Include="System" /> |
||||
|
<Reference Include="System.configuration" /> |
||||
|
<Reference Include="System.Core" /> |
||||
|
<Reference Include="System.Web.Extensions" /> |
||||
|
<Reference Include="System.Xml.Linq" /> |
||||
|
<Reference Include="System.Data.DataSetExtensions" /> |
||||
|
<Reference Include="Microsoft.CSharp" /> |
||||
|
<Reference Include="System.Data" /> |
||||
|
<Reference Include="System.Net.Http" /> |
||||
|
<Reference Include="System.Xml" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<Compile Include="API\RestApiClient.cs" /> |
||||
|
<Compile Include="API\SendTransactionServices.cs" /> |
||||
|
<Compile Include="Business\GetStatic.cs" /> |
||||
|
<Compile Include="Business\SendEmail.cs" /> |
||||
|
<Compile Include="Business\SmtpMailSetting.cs" /> |
||||
|
<Compile Include="Business\TxnPush.cs" /> |
||||
|
<Compile Include="Common\CommonResponse.cs" /> |
||||
|
<Compile Include="Common\SendTransactionRequest.cs" /> |
||||
|
<Compile Include="DAO\SwiftDao.cs" /> |
||||
|
<Compile Include="DAO\TxnPushDAO.cs" /> |
||||
|
<Compile Include="Program.cs" /> |
||||
|
<Compile Include="Properties\AssemblyInfo.cs" /> |
||||
|
<Compile Include="Repository\SendRepository.cs" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<None Include="App.config"> |
||||
|
<SubType>Designer</SubType> |
||||
|
</None> |
||||
|
<None Include="JMETxnPushScheduler_TemporaryKey.pfx" /> |
||||
|
<None Include="packages.config" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2"> |
||||
|
<Visible>False</Visible> |
||||
|
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName> |
||||
|
<Install>true</Install> |
||||
|
</BootstrapperPackage> |
||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
||||
|
<Visible>False</Visible> |
||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName> |
||||
|
<Install>false</Install> |
||||
|
</BootstrapperPackage> |
||||
|
</ItemGroup> |
||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
||||
|
</Project> |
@ -0,0 +1,21 @@ |
|||||
|
using JMETxnPushScheduler.Business; |
||||
|
using System; |
||||
|
|
||||
|
namespace SendMail |
||||
|
{ |
||||
|
class Program |
||||
|
{ |
||||
|
|
||||
|
static void Main(string[] args) |
||||
|
{ |
||||
|
Console.WriteLine("Scheduler started on: " + DateTime.Now); |
||||
|
TxnPush _txnPush = new TxnPush(); |
||||
|
_txnPush.TxnSyncMain(); |
||||
|
// _txnPush.TxnReleaseMain();
|
||||
|
Console.WriteLine("Scheduler started on: " + DateTime.Now); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
using System.Reflection; |
||||
|
using System.Runtime.CompilerServices; |
||||
|
using System.Runtime.InteropServices; |
||||
|
|
||||
|
// General Information about an assembly is controlled through the following
|
||||
|
// set of attributes. Change these attribute values to modify the information
|
||||
|
// associated with an assembly.
|
||||
|
[assembly: AssemblyTitle("SendMail")] |
||||
|
[assembly: AssemblyDescription("")] |
||||
|
[assembly: AssemblyConfiguration("")] |
||||
|
[assembly: AssemblyCompany("")] |
||||
|
[assembly: AssemblyProduct("SendMail")] |
||||
|
[assembly: AssemblyCopyright("Copyright © 2019")] |
||||
|
[assembly: AssemblyTrademark("")] |
||||
|
[assembly: AssemblyCulture("")] |
||||
|
|
||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
|
// to COM components. If you need to access a type in this assembly from
|
||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||
|
[assembly: ComVisible(false)] |
||||
|
|
||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
[assembly: Guid("5ac9671d-fb0e-4816-a870-886006fc5c19")] |
||||
|
|
||||
|
// Version information for an assembly consists of the following four values:
|
||||
|
//
|
||||
|
// Major Version
|
||||
|
// Minor Version
|
||||
|
// Build Number
|
||||
|
// Revision
|
||||
|
//
|
||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
|
// by using the '*' as shown below:
|
||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
[assembly: AssemblyVersion("1.0.0.0")] |
||||
|
[assembly: AssemblyFileVersion("1.0.0.0")] |
@ -0,0 +1,28 @@ |
|||||
|
using JMETxnPushScheduler.Business; |
||||
|
using JMETxnPushScheduler.DAO; |
||||
|
using System.Data; |
||||
|
|
||||
|
namespace JMETxnPushScheduler.Repository |
||||
|
{ |
||||
|
public class SendRepository |
||||
|
{ |
||||
|
SwiftDao _dao = new SwiftDao(); |
||||
|
|
||||
|
|
||||
|
public DataTable GetMailDetails() |
||||
|
{ |
||||
|
var sql = "EXEC proc_SendMail @flag = 'sendMial'"; |
||||
|
|
||||
|
|
||||
|
return _dao.ExecuteDataTable(sql); |
||||
|
} |
||||
|
public DataTable ErrorEmail() |
||||
|
{ |
||||
|
var sql = "EXEC proc_SendMail @flag = 'error'"; |
||||
|
|
||||
|
return _dao.ExecuteDataTable(sql); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<packages> |
||||
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" /> |
||||
|
</packages> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue