Skip to content

Commit

Permalink
fixed logging, updated version info
Browse files Browse the repository at this point in the history
  • Loading branch information
ahwm committed Oct 22, 2018
1 parent 8ec96e6 commit 9bcb5ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
13 changes: 6 additions & 7 deletions src/Cardknox.NET/Cardknox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@
<Product>Cardknox.API.Wrapper</Product>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<RootNamespace>CardknoxApi</RootNamespace>
<Version>3.0</Version>
<Version>3.0.1-beta</Version>
<PackageProjectUrl>https://cardknox.adamh.us/</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/ahwm/Cardknox-API-Wrapper/blob/master/LICENSE</PackageLicenseUrl>
<Description>API Wrapper for Cardknox Payment Processor written in C#

Refer to https://kb.cardknox.com/api for full API reference.</Description>
<PackageReleaseNotes>EBT Food Stamp has been added:

-sale
-credit
-balance
-voucher</PackageReleaseNotes>
<PackageReleaseNotes>Added logging</PackageReleaseNotes>
<PackageTags>cardknox gateway processor payment api</PackageTags>
<Copyright>© 2018 Adam Humpherys</Copyright>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
Expand All @@ -33,4 +28,8 @@ Refer to https://kb.cardknox.com/api for full API reference.</Description>
<DocumentationFile></DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions src/Cardknox.NET/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public static void LogRequest(NameValueCollection _values)
if (!EnableLogging || LogLocation == "")
return;

string loc = LogLocation;
string loc = String.Format(LogLocation, DateTime.Now);
if (LogLocation.StartsWith("~"))
loc = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, loc);
loc = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, loc.Replace("~/", ""));

string body = "----" + DateTime.UtcNow.ToString("s") + "----" + Environment.NewLine;
body += "Cardknox Request" + Environment.NewLine;
body += "-----------------" + Environment.NewLine;
body += "---------------------------" + Environment.NewLine;
foreach (var k in _values.AllKeys)
{
if (!NoInclude.Contains(k))
Expand All @@ -62,13 +62,13 @@ public static void LogResponse(NameValueCollection _values)
if (!EnableLogging || LogLocation == "")
return;

string loc = LogLocation;
string loc = String.Format(LogLocation, DateTime.Now);
if (LogLocation.StartsWith("~"))
loc = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, loc);
loc = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, loc.Replace("~/", ""));

string body = "----" + DateTime.UtcNow.ToString("s") + "----" + Environment.NewLine;
body += "Cardknox Response" + Environment.NewLine;
body += "-----------------" + Environment.NewLine;
body += "---------------------------" + Environment.NewLine;
foreach (var k in _values.AllKeys)
{
body += k + " = " + _values[k] + Environment.NewLine;
Expand Down

0 comments on commit 9bcb5ef

Please sign in to comment.