예제 #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));
        }
예제 #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);
        }
예제 #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);
        }