Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Paytrail-dotnet-sdk/PayTrail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ public abstract class Paytrail

public Dictionary<string, string> GetHeaders(string method, string transactionId = null, string checkoutTokenizationId = null)
{
var datetime = new DateTime();
var headers = new Dictionary<string, string>();
try
{
headers["checkout-account"] = this.merchantId;
headers["checkout-algorithm"] = "sha256";
headers["checkout-method"] = method.ToUpper();
headers["checkout-nonce"] = Guid.NewGuid().ToString();
headers["checkout-timestamp"] = datetime.ToString("Y-m-d\\TH:i:s.u\\Z");
string iso8601String = DateTimeOffset.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffzzz");
headers["checkout-timestamp"] = iso8601String;
headers["platform-name"] = this.platformName;
headers["content-type"] = "application/json; charset=utf-8";

Expand Down