Esempio n. 1
0
        /// <summary>
        /// Perform a new Verify.
        /// <param name="verifyData">
        /// Verify Object
        /// </param>
        /// <returns>
        /// VerifyResponseInformation object.
        /// </returns>
        /// <seealso cref="PayHubWS.com.payhub.ws.api.VerifyResponseInformation"/>
        /// </summary>
        public VerifyResponseInformation doVerify(Verify verifyData)
        {
            verifyData.Merchant = _merchant;
            verifyData._url     = _url;
            var    request = setHeadersPost(verifyData._url, this._oauthToken);
            string json    = JsonConvert.SerializeObject(verifyData, Formatting.None, new JsonSerializerSettings {
                DefaultValueHandling = DefaultValueHandling.Ignore
            });
            VerifyResponseInformation response = verifyData.performVoidTransaction(json, request);

            response.transactionManager = this;
            return(response);
        }
Esempio n. 2
0
        /// <summary>
        /// Perform a new query that retrieves you the Verify Information for a particular Verify Transaction.
        ///
        /// <param name="verifyId">
        /// the ID of a particular Verify Transaction.
        /// </param>
        /// <returns>
        /// VerifyResponseInformation object.
        /// </returns>
        /// <seealso cref="PayHubWS.com.payhub.ws.api.VerifyResponseInformation"/>
        /// </summary>
        public VerifyResponseInformation getVerifyInformation(string verifyId)
        {
            if (verifyId == null || verifyId.Equals(""))
            {
                return(null);
            }
            VerifyResponseInformation response = new VerifyResponseInformation();
            var    url     = _url + Verify.VERIFY_ID_LINK + verifyId;
            var    request = setHeadersGet(url, this._oauthToken);
            string result  = doGet(request);

            if (result == null || result.Equals(""))
            {
                return(null);
            }
            response                    = JsonConvert.DeserializeObject <VerifyResponseInformation>(result);
            response.rowData            = result;
            response.transactionManager = this;
            return(response);
        }
Esempio n. 3
0
 /// <summary> 
 /// Perform a new query that retrieves you the Verify Information for a particular Verify Transaction.
 ///
 /// <param name="verifyId"> 
 /// the ID of a particular Verify Transaction.
 /// </param>
 /// <returns>
 /// VerifyResponseInformation object.
 /// </returns>   
 /// <seealso cref="PayHubWS.com.payhub.ws.api.VerifyResponseInformation"/>
 /// </summary> 
 public VerifyResponseInformation getVerifyInformation(string verifyId)
 {
     if (verifyId == null || verifyId .Equals(""))
         return null;
     VerifyResponseInformation response = new VerifyResponseInformation();
     var url = _url + Verify.VERIFY_ID_LINK + verifyId;
     var request = setHeadersGet(url, this._oauthToken);
     string result = doGet(request);
     if (result == null || result.Equals(""))
         return null;
     response = JsonConvert.DeserializeObject<VerifyResponseInformation>(result);
     response.rowData = result;
     response.transactionManager = this;
     return response;
 }
Esempio n. 4
0
 public VerifyResponseInformation performVoidTransaction(string json, HttpWebRequest request)
 {
     VerifyResponseInformation responseObject = new VerifyResponseInformation();
     using (var streamWriter = new StreamWriter(request.GetRequestStream()))
     {
         streamWriter.Write(json);
         streamWriter.Flush();
         streamWriter.Close();
     }
     var result = doPost(request, _url);
     responseObject = JsonConvert.DeserializeObject<VerifyResponseInformation>(result);
     responseObject.rowData = result;
     return responseObject;
 }