/// <summary>
        /// Get an authentication usind id
        /// </summary>
        /// <param name="auth">Authentications</param>
        /// <returns>Authentications</returns>
        public Authentications Get(Authentications authentications, bool includeEnrollment = false)
        {
            var     request  = GetInternal(authentications, includeEnrollment);
            dynamic response = _client.ProcessRequest(request);

            return(new Authentications(response));
        }
        public async Task <Authentications> GetAsync(Authentications authentications, bool includeEnrollment = false)
        {
            var     request  = GetInternal(authentications, includeEnrollment);
            dynamic response = await _client.ProcessRequestAsync(request);

            return(new Authentications(response));
        }
        public async Task <Authentications> SubmitAsync(Authentications authentications)
        {
            var     request  = SubmitInternal(authentications);
            dynamic response = await _client.ProcessRequestAsync(request);

            return(new Authentications(response));
        }
        /// <summary>
        /// Submit an authentications request
        /// </summary>
        /// <param name="Authentications">Authentications</param>
        /// <returns>Authentications</returns>
        public Authentications Submit(Authentications authentications)
        {
            var     request  = SubmitInternal(authentications);
            dynamic response = _client.ProcessRequest(request);

            return(new Authentications(response));
        }
        /// <summary>
        /// Get an authentication usind id
        /// </summary>
        /// <param name="auth">Authentications</param>
        /// <returns>Authentications</returns>
        public Authentications get(Authentications authentications, bool includeEnrollment = false)
        {
            authentications.setRequiredFields(new List <string> {
                ThreeDSecureConstants.id
            });
            authentications.checkRequiredFields();

            Dictionary <string, string> queryStr = new Dictionary <string, string>();
            StringBuilder toInclude = new StringBuilder();

            if (includeEnrollment)
            {
                toInclude.Append("enrollmentchecks");
            }
            queryStr.Add("fields", toInclude.ToString());

            Request request = new Request(
                uri: this.prepareURI("/accounts/" + client.account() + "/authentications/" + authentications.id()),
                queryString: queryStr
                );

            dynamic response = this.client.processRequest(request);

            return(new Authentications(response));
        }
示例#6
0
        /// <summary>
        /// Get an authentication usind id
        /// </summary>
        /// <param name="auth">Authentications</param>
        /// <returns>Authentications</returns>
        public Authentications Get(Authentications authentications, bool includeEnrollment = false)
        {
            authentications.SetRequiredFields(new List <string> {
                GlobalConstants.Id
            });
            authentications.CheckRequiredFields();

            Dictionary <string, string> queryStr = new Dictionary <string, string>();
            StringBuilder toInclude = new StringBuilder();

            if (includeEnrollment)
            {
                toInclude.Append("enrollmentchecks");
            }
            queryStr.Add("fields", toInclude.ToString());

            Request request = new Request(
                uri: PrepareUri("/accounts/" + _client.Account() + "/authentications/" + authentications.Id()),
                queryString: queryStr
                );

            dynamic response = _client.ProcessRequest(request);

            return(new Authentications(response));
        }
        private Request SubmitInternal(Authentications authentications)
        {
            authentications.SetRequiredFields(new List <string> {
                GlobalConstants.MerchantRefNum,
                GlobalConstants.PaResp,
            });

            authentications.CheckRequiredFields();
            return(new Request(
                       method: RequestType.Post,
                       uri: PrepareUri("/accounts/" + _client.Account() + "/enrollmentchecks/" + authentications.EnrollmentId() + "/authentications"),
                       body: authentications
                       ));
        }
        /// <summary>
        /// Submit an authentications request
        /// </summary>
        /// <param name="Authentications">Authentications</param>
        /// <returns>Authentications</returns>
        public Authentications submit(Authentications authentications)
        {
            authentications.setRequiredFields(new List <string> {
                ThreeDSecureConstants.merchantRefNum,
                ThreeDSecureConstants.paResp,
            });

            authentications.checkRequiredFields();
            Request request = new Request(
                method: RequestType.POST,
                uri: this.prepareURI("/accounts/" + client.account() + "/enrollmentchecks/" + authentications.enrollmentId() + "/authentications"),
                body: authentications
                );
            dynamic response = this.client.processRequest(request);

            return(new Authentications(response));
        }
示例#9
0
        /// <summary>
        /// Submit an authentications request
        /// </summary>
        /// <param name="Authentications">Authentications</param>
        /// <returns>Authentications</returns>
        public Authentications Submit(Authentications authentications)
        {
            authentications.SetRequiredFields(new List <string> {
                GlobalConstants.MerchantRefNum,
                GlobalConstants.PaResp,
            });

            authentications.CheckRequiredFields();
            Request request = new Request(
                method: RequestType.Post,
                uri: PrepareUri("/accounts/" + _client.Account() + "/enrollmentchecks/" + authentications.EnrollmentId() + "/authentications"),
                body: authentications
                );
            dynamic response = _client.ProcessRequest(request);

            return(new Authentications(response));
        }
        private Request GetInternal(Authentications authentications, bool includeEnrollment)
        {
            authentications.SetRequiredFields(new List <string> {
                GlobalConstants.Id
            });
            authentications.CheckRequiredFields();

            Dictionary <string, string> queryStr = new Dictionary <string, string>();
            StringBuilder toInclude = new StringBuilder();

            if (includeEnrollment)
            {
                toInclude.Append("enrollmentchecks");
            }
            queryStr.Add("fields", toInclude.ToString());

            return(new Request(
                       uri: PrepareUri("/accounts/" + _client.Account() + "/authentications/" + authentications.Id()),
                       queryString: queryStr
                       ));
        }