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

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

            if (result == null || result.Equals(""))
            {
                return(null);
            }
            response                    = JsonConvert.DeserializeObject <VoidResponseInformation>(result);
            response.rowData            = result;
            response.transactionManager = this;
            return(response);
        }
Ejemplo n.º 3
0
 /// <summary> 
 /// Perform a new query that retrieves you the Void Information for a particular Void Transaction.
 ///
 /// <param name="voidId"> 
 /// the ID of a particular Void Transaction.
 /// </param>
 /// <returns>
 /// LastVoidResponseInformation object.
 /// </returns>   
 /// <seealso cref="PayHubWS.com.payhub.ws.api.LastVoidResponseInformation"/>
 /// </summary> 
 public VoidResponseInformation getVoidInformation(string voidId)
 {
     if (voidId == null || voidId.Equals(""))
         return null;
     VoidResponseInformation response = new VoidResponseInformation();
     var url = _url + VoidTransaction.VOID_ID_LINK + voidId;
     var request = setHeadersGet(url, this._oauthToken);
     string result = doGet(request);
     if (result == null || result.Equals(""))
         return null;
     response = JsonConvert.DeserializeObject<VoidResponseInformation>(result);
     response.rowData = result;
     response.transactionManager = this;
     return response;
 }