Пример #1
0
        /// <summary>
        /// Perform a new AuthOnly.
        ///
        /// <param name="authorization">
        /// AuthOnly Object
        /// </param>
        /// <returns>
        /// AuthorizationResponseInformation object.
        /// </returns>
        /// <seealso cref="PayHubWS.com.payhub.ws.api.AuthorizationResponseInformation"/>
        /// </summary>
        public AuthorizationResponseInformation doAuthonly(AuthOnly authorization)
        {
            authorization.Merchant = _merchant;
            authorization._url     = _url;
            var    request = setHeadersPost(authorization._url, this._oauthToken);
            string json    = JsonConvert.SerializeObject(authorization, Formatting.None, new JsonSerializerSettings {
                DefaultValueHandling = DefaultValueHandling.Ignore
            });
            AuthorizationResponseInformation response = authorization.authonly(json, request);

            response.TransactionManager = this;
            return(response);
        }
Пример #2
0
        /// <summary>
        /// Perform a new query that retrieves you the AuthorizationOnly Information for a particular AuthorizationOnly Transaction.
        ///
        /// <param name="authorizationId">
        /// the ID of a particular AuthorizationOnly Transaction.
        /// </param>
        /// <returns>
        /// AuthorizationResponseInformation object.
        /// </returns>
        /// <seealso cref="PayHubWS.com.payhub.ws.api.AuthorizationResponseInformation"/>
        /// </summary>
        public AuthorizationResponseInformation getAuthorizationInformation(string authorizationId)
        {
            if (authorizationId == null || authorizationId.Equals(""))
            {
                return(null);
            }
            AuthorizationResponseInformation response = new AuthorizationResponseInformation();
            var    url     = _url + AuthOnly.AUTH_ID_LINK + authorizationId;
            var    request = setHeadersGet(url, this._oauthToken);
            string result  = doGet(request);

            if (result == null || result.Equals(""))
            {
                return(null);
            }
            response                    = JsonConvert.DeserializeObject <AuthorizationResponseInformation>(result);
            response.rowData            = result;
            response.TransactionManager = this;
            return(response);
        }
Пример #3
0
 /// <summary> 
 /// Perform a new query that retrieves you the AuthorizationOnly Information for a particular AuthorizationOnly Transaction.
 ///
 /// <param name="authorizationId"> 
 /// the ID of a particular AuthorizationOnly Transaction.
 /// </param>
 /// <returns>
 /// AuthorizationResponseInformation object.
 /// </returns>   
 /// <seealso cref="PayHubWS.com.payhub.ws.api.AuthorizationResponseInformation"/>
 /// </summary> 
 public AuthorizationResponseInformation getAuthorizationInformation(string authorizationId)
 {
     if (authorizationId == null || authorizationId.Equals(""))
         return null;
     AuthorizationResponseInformation response = new AuthorizationResponseInformation();
     var url = _url + AuthOnly.AUTH_ID_LINK + authorizationId;
     var request = setHeadersGet(url, this._oauthToken);
     string result = doGet(request);
     if (result == null || result.Equals(""))
         return null;
     response = JsonConvert.DeserializeObject<AuthorizationResponseInformation>(result);
     response.rowData = result;
     response.TransactionManager = this;
     return response;
 }