Ejemplo n.º 1
0
 protected static WebHeaderCollection GetHttpHeaders(BaseRequest request, Options options)
 {
     string randomString = DateTime.Now.ToString("ddMMyyyyhhmmssffff");
     WebHeaderCollection headers = new WebHeaderCollection();
     headers.Add("Accept", "application/json");
     headers.Add(RANDOM_HEADER_NAME, randomString);
     headers.Add(CLIENT_VERSION, "iyzipay-dotnet-2.1.9");
     headers.Add(AUTHORIZATION, PrepareAuthorizationString(request, randomString, options));
     return headers;
 }
Ejemplo n.º 2
0
 private static String PrepareAuthorizationString(BaseRequest request, String randomString, Options options)
 {
     String hash = HashGenerator.generateHash(options.ApiKey, options.SecretKey, randomString, request);
     return IYZIWS_HEADER_NAME + options.ApiKey + COLON + hash;
 }