Skip to content

Commit

Permalink
JSON bugfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
eyupbasefy committed Oct 25, 2024
1 parent 94f828c commit a2481ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Iyzipay.Samples/CardManagementPageSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task Should_Initialize_Card_Management_PageAsync()
Locale = Locale.TR.ToString()
};

CardManagementPageInitialize cardManagementPageInitialize = await CardManagementPageInitialize.Create(request, options);
CardManagementPageInitialize cardManagementPageInitialize = CardManagementPageInitialize.Create(request, options);
PrintResponse(cardManagementPageInitialize);

Assert.AreEqual(Locale.TR.ToString(), cardManagementPageInitialize.Locale);
Expand Down
3 changes: 2 additions & 1 deletion Iyzipay/IyzipayResourceV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json;

namespace Iyzipay
{
Expand Down Expand Up @@ -70,7 +71,7 @@ private static String PrepareAuthorizationStringWithRequestBody(BaseRequestV2 re
String randomKey = GenerateRandomKey();
String uriPath = FindUriPath(url);

String payload = request != null ? uriPath + JsonBuilder.SerializeObjectToPrettyJson(request) : uriPath;
String payload = request != null ? uriPath + JsonConvert.SerializeObject(request) : uriPath;
String dataToEncrypt = randomKey + payload;
String hash = HashGeneratorV2.GenerateHash(options.ApiKey, options.SecretKey, randomKey, dataToEncrypt);
return IYZIWS_V2_HEADER_NAME + hash;
Expand Down

0 comments on commit a2481ab

Please sign in to comment.