Example #1
0
        public virtual void AnnulAuthorization(AnnulAuthorizationRequest request)
        {
            Ensure.That(request, "request").IsNotNull();

            var httpRequest  = AnnulAuthorizationHttpRequestFactory.Create(request);
            var httpResponse = Connection.Send(httpRequest);

            ResponseFactory.Create <AnnulAuthorizationResponse>(httpResponse);
        }
Example #2
0
        public PaynovaClient(IHttpConnection connection)
        {
            Ensure.That(connection, "connection").IsNotNull();

            Connection = connection;
            Serializer = new DefaultJsonSerializer();

            CreateOrderHttpRequestFactory               = new CreateOrderHttpRequestFactory(Runtime.Instance, Serializer);
            AuthorizeInvoiceHttpRequestFactory          = new AuthorizeInvoiceHttpRequestFactory(Runtime.Instance, Serializer);
            InitializePaymentHttpRequestFactory         = new InitializePaymentHttpRequestFactory(Runtime.Instance, Serializer);
            RefundPaymentHttpRequestFactory             = new RefundPaymentHttpRequestFactory(Runtime.Instance, Serializer);
            FinalizeAuthorizationHttpRequestFactory     = new FinalizeAuthorizationHttpRequestFactory(Runtime.Instance, Serializer);
            AnnulAuthorizationHttpRequestFactory        = new AnnulAuthorizationHttpRequestFactory(Runtime.Instance, Serializer);
            GetAddressesHttpRequestFactory              = new GetAddressesHttpRequestFactory(Runtime.Instance, Serializer);
            GetCustomerProfileHttpRequestFactory        = new GetCustomerProfileHttpRequestFactory(Runtime.Instance, Serializer);
            GetPaymentOptionsHttpRequestFactory         = new GetPaymentOptionsHttpRequestFactory(Runtime.Instance, Serializer);
            RemoveCustomerProfileCardHttpRequestFactory = new RemoveCustomerProfileCardHttpRequestFactory(Runtime.Instance, Serializer);
            RemoveCustomerProfileHttpRequestFactory     = new RemoveCustomerProfileHttpRequestFactory(Runtime.Instance, Serializer);

            ResponseFactory = new GenericResponseFactory(Serializer);
        }