예제 #1
0
        public virtual GetPaymentOptionsResponse GetPaymentOptions(GetPaymentOptionsRequest request)
        {
            Ensure.That(request, "request").IsNotNull();

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

            return(ResponseFactory.Create <GetPaymentOptionsResponse>(httpResponse));
        }
예제 #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);
        }