public static string CreateHashString(IOSRequest request, string secretKey) { var hashString = "MERCHANT=" + request.MERCHANT; hashString += "&REFNOEXT=" + request.REFNOEXT; hashString += "&HASH=" + CreateMD5Hash(secretKey, request); return(hashString); }
protected static string CreateMD5Hash(string secretKey, IOSRequest request) { string HASHED_CONTENT = string.Empty; var hashString = Helper.GetLengthAsByte(request.MERCHANT) + request.MERCHANT; hashString += Helper.GetLengthAsByte(request.REFNOEXT) + request.REFNOEXT; HASHED_CONTENT = Helper.CreateHash(hashString, secretKey); return(HASHED_CONTENT); }
public static IOSResponse Execute(IOSRequest request, Options options) { var hashString = CreateHashString(request, options.SecretKey); return(HttpCaller.Create().PostData <IOSResponse>(options.Url, hashString)); }