Skip to content

Commit

Permalink
Merge branch 'hotfix/0.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
zunkas committed Aug 18, 2020
2 parents f3db9c4 + 899600d commit 22a6793
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Svea.WebPay.SDK/SveaHttpClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
Expand Down Expand Up @@ -245,7 +246,8 @@ string BuildErrorMessage(string httpResponseBody)

private async Task SetRequestHeaders(HttpRequestMessage httpRequest)
{
var timestamp = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss");
var timestamp = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);

var token = CreateAuthenticationToken(httpRequest.Content != null ? await httpRequest.Content.ReadAsStringAsync() : string.Empty, timestamp);
httpRequest.Headers.Add("Authorization", "Svea" + " " + token);
httpRequest.Headers.Add("Timestamp", timestamp);
Expand Down

0 comments on commit 22a6793

Please sign in to comment.