示例#1
0
        public async Task <IEnumerable <string> > ListAsync(string transactionId, IvsParams param)
        {
            var result = await _client.SendAsync(new Request
            {
                Method = ListMethod,
                Params = param
            });

            if (!result["biz_response"]["success"].Value <bool>())
            {
                throw new ZmopException(result["biz_response"]["errorMessage"].Value <string>());
            }

            return(result["biz_response"]["risk_code"].Values <string>());
        }
示例#2
0
        public async Task <int> GetAsync(string transactionId, IvsParams param)
        {
            var result = await _client.SendAsync(new Request
            {
                Method = GetMethod,
                Params = param
            });

            if (!result["biz_response"]["success"].Value <bool>())
            {
                throw new ZmopException(result["biz_response"]["errorMessage"].Value <string>());
            }

            return(result["biz_response"]["score"].Value <int>());
        }