Exemplo n.º 1
0
        public static string Execute(BinV1Request request, Options options)
        {
            var    hashString = CreateHashString(request, options.SecretKey);
            string createUrl  = options.Url + request.BIN + "?" + hashString;

            return(HttpCaller.GetDataToUrl(createUrl));
        }
Exemplo n.º 2
0
        public static string CreateHashString(BinV1Request request, string secretKey)
        {
            var hashString = "merchant=" + request.MERCHANT;

            hashString += "&timestamp=" + request.TIMESTAMP;
            hashString += "&signature=" + CreateSha256Hash(secretKey, request);
            return(hashString);
        }
Exemplo n.º 3
0
        protected static string CreateSha256Hash(string secretKey, BinV1Request request)
        {
            string HASHED_CONTENT = string.Empty;
            var    hashString     = request.MERCHANT;

            hashString    += request.TIMESTAMP;
            HASHED_CONTENT = Helper.CreateSha256Hash(hashString, secretKey);
            return(HASHED_CONTENT);
        }