コード例 #1
0
        public CreateCheckoutRequest GenerateValidCreateCheckoutRequest(string ourOrderReferenceId, bool requiresShippingInfo = true)
        {
            var checkoutRequest = new CreateCheckoutRequest();
            //$12.34
            var amount       = 1234;
            var currencyCode = Enums.CheckoutCurrencyCodeEnum.USD;

            checkoutRequest.AmountInCents     = amount;
            checkoutRequest.CurrencyCode      = currencyCode;
            checkoutRequest.OrderDescription  = "Test checkout";
            checkoutRequest.OrderReferenceId  = ourOrderReferenceId;
            checkoutRequest.CheckoutCancelUrl = "https://test.sezzle.com/cancel";
            //Changing the CheckoutCompleteUrl for lower environments. This will navigate to a real page to allow intigration tests to pick up an element at the end of the checkout.
            checkoutRequest.CheckoutCompleteUrl = "https://www.google.com/";
            checkoutRequest.CustomerDetails     = _testCustomerDetails;
            checkoutRequest.BillingAddress      = new Address("TestFirst TestLast", "1516 W. Lake St", "Minneapolis", "MN", "55408", "US");
            checkoutRequest.ShippingAddress     = new Address("TestFirst TestLast", "1516 W. Lake St", "Minneapolis", "MN", "55408", "US");
            checkoutRequest.Items = new List <Item> {
                new Item("Test T-Shirt", "ABC123", 1, new Price()
                {
                    AmountInCents = amount, Currency = currencyCode
                })
            };
            //sezzle appears to not store the shipping information without this flag being set.
            checkoutRequest.RequiresShippingInfo = requiresShippingInfo;

            return(checkoutRequest);
        }
コード例 #2
0
        // https://developer.squareup.com/docs/checkout-api-overview
        public static string CheckoutCreatOrder(CreateCheckoutRequest request, SquareSetting setting)
        {
            var queryUrl = setting.BaseURL + "/v2/locations/" + setting.LocationId + "/checkouts";

            return(ApiClient.Create("Bearer", setting.AccessToken)
                   .PostJsonAsync(queryUrl, request).Result.Content);
        }
コード例 #3
0
 public void Init()
 {
     instance = new CreateCheckoutRequest(
         IdempotencyKey: Guid.NewGuid().ToString(),
         Order: new CreateOrderRequest(
             LineItems: new List <CreateOrderRequestLineItem>()
             ));
 }
コード例 #4
0
ファイル: PaymentsApi.cs プロジェクト: lzporter/Kooboo
        // https://developer.squareup.com/docs/checkout-api-overview
        public static CreateCheckoutResponse CheckoutCreatOrder(CreateCheckoutRequest request, SquareSetting setting)
        {
            var queryUrl = setting.BaseURL + "/v2/locations/" + setting.LocationId + "/checkouts";

            var response = ApiClient.Create("Bearer", setting.AccessToken)
                           .PostJsonAsync(queryUrl, request).Result;

            return(DeserializeResponse <CreateCheckoutResponse>(response));
        }
コード例 #5
0
        public async Task <Checkout> CreateCheckoutAsync(CreateCheckoutRequest createCheckoutRequest)
        {
            ValidateModel(createCheckoutRequest);

            var response = await PostAsJsonAsync("/checkouts", JsonConvert.SerializeObject(createCheckoutRequest)).ConfigureAwait(false);

            return(JsonConvert.DeserializeObject <CheckoutResponse>(
                       await response.Content.ReadAsStringAsync().ConfigureAwait(false)).Checkout);
        }
コード例 #6
0
        /// <summary>
        /// This createCheckoutRequest endpoint creates a createCheckoutRequest in our system, and returns the URL that you should redirect the user to. We suggest you provide as much optional information about the user as you have available, since this will speed up our createCheckoutRequest process and increase conversion.
        /// Sezzle is able to handle the entire createCheckoutRequest process after a CreateCheckoutRequest has been provided.However, if your flow requires that the user confirm their createCheckoutRequest on your site after being approved by Sezzle, you may include the merchant_completes parameter with the createCheckoutRequest request.In this flow, Sezzle will not complete the order unless you make a createCheckoutRequest completion request.
        /// </summary>
        /// <remarks>
        ///     https://gateway.sezzle.com/v1/checkouts
        /// </remarks>
        /// <param name="createCheckoutRequest"></param>
        /// <returns></returns>
        public async Task <CreateCheckoutResponse> CreateAsync(CreateCheckoutRequest createCheckoutRequest)
        {
            var tokenTask = _authenticationEndpoint.CreateTokenAsync();

            //create url and request object
            var requestUrl = GetCheckoutsBaseUrl();

            var token    = await tokenTask;
            var response = await _sezzleHttpClient.PostAsync <CreateCheckoutRequest, CreateCheckoutResponse>(token.Token, requestUrl, createCheckoutRequest);

            return(response);
        }
コード例 #7
0
        public async Task <CheckoutResponse> CreateCheckout(CreateCheckoutRequest request)
        {
            request.SignRequest(this._signatureService);

            var checkout = await this.AuthenticatedSendAsync <CreateCheckoutRequest, CheckoutResponse>(request, request.Request(this._apiKey.Host));

            if (checkout.Signature == checkout.CalculateSignature(this._signatureService))
            {
                return(checkout);
            }

            throw new Exception($"Signature error, response signature: {checkout.Signature}, calculated signature: {checkout.CalculateSignature(this._signatureService)}");
        }
コード例 #8
0
        public IPaymentResponse Charge(PaymentRequest request)
        {
            if (this.Setting == null)
            {
                return(null);
            }

            // todo 需要转换为货币的最低单位
            CreateCheckoutRequest checkoutRequest = GetCheckoutRequest(request);

            var result = PaymentsApi.CheckoutCreatOrder(checkoutRequest, Setting);

            var deserializeResult = JsonConvert.DeserializeObject <CreateCheckoutResponse>(result);

            return(new RedirectResponse(deserializeResult.Checkout.CheckoutPageURL, Guid.Empty));
        }
コード例 #9
0
ファイル: SquareCheckout.cs プロジェクト: weedkiller/Kooboo
        public IPaymentResponse Charge(PaymentRequest request)
        {
            if (this.Setting == null)
            {
                return(null);
            }

            CreateCheckoutRequest checkoutRequest = GetCheckoutRequest(request);
            var deserializeResult = PaymentsApi.CheckoutCreatOrder(checkoutRequest, Setting);

            // 把OrderID赋值到request referenceID 为了后面 checkStatus 使用
            request.ReferenceId = deserializeResult.Checkout.Order.ID;
            PaymentManager.UpdateRequest(request, Context);

            return(new RedirectResponse(deserializeResult.Checkout.CheckoutPageURL, Guid.Empty));
        }
コード例 #10
0
        public IActionResult OnPost()
        {
            CheckoutApi checkoutApi = new CheckoutApi(configuration: this.configuration);

            try
            {
                // create line items for the order
                // This example assumes the order information is retrieved and hard coded
                // You can find different ways to retrieve order information and fill in the following lineItems object.
                List <CreateOrderRequestLineItem> lineItems = new List <CreateOrderRequestLineItem>()
                {
                    new CreateOrderRequestLineItem(
                        Name: "Test Item A",
                        Quantity: "1",
                        BasePriceMoney: new Money(Amount: 500,
                                                  Currency: Money.CurrencyEnum.USD)
                        ),
                    new CreateOrderRequestLineItem(
                        Name: "Test Item B",
                        Quantity: "3",
                        BasePriceMoney: new Money(Amount: 1000,
                                                  Currency: Money.CurrencyEnum.USD)
                        )
                };

                // create order with the line items
                CreateOrderRequest order = new CreateOrderRequest(
                    LineItems: lineItems
                    );

                // create checkout request with the previously created order
                CreateCheckoutRequest createCheckoutRequest = new CreateCheckoutRequest(
                    IdempotencyKey: Guid.NewGuid().ToString(),
                    Order: order
                    );

                // create checkout response, and redirect to checkout page if successful
                CreateCheckoutResponse response = checkoutApi.CreateCheckout(locationId, createCheckoutRequest);
                return(Redirect(response.Checkout.CheckoutPageUrl));
            }
            catch (Square.Connect.Client.ApiException e)
            {
                return(RedirectToPage("Error", new { error = e.Message }));
            }
        }
コード例 #11
0
        public IActionResult OnPost()
        {
            CheckoutApi checkoutApi = new CheckoutApi();
            int         amount      = (int)float.Parse(Request.Form["amount"]) * 100;

            try
            {
                // create line items for the order
                List <CreateOrderRequestLineItem> lineItems = new List <CreateOrderRequestLineItem>()
                {
                    new CreateOrderRequestLineItem(
                        Name: "Test Payment",
                        Quantity: "1",
                        BasePriceMoney: new Money(Amount: 500,
                                                  Currency: Money.CurrencyEnum.USD)
                        )
                };

                // create order with the line items
                CreateOrderRequest order = new CreateOrderRequest(
                    LineItems: lineItems
                    );

                // create checkout request with the previously created order
                CreateCheckoutRequest body = new CreateCheckoutRequest(
                    IdempotencyKey: Guid.NewGuid().ToString(),
                    Order: order
                    );

                // create checkout response, and redirect to checkout page if successful
                CreateCheckoutResponse response = checkoutApi.CreateCheckout(locationId, body);
                return(Redirect(response.Checkout.CheckoutPageUrl));
            }
            catch (Square.Connect.Client.ApiException e)
            {
                return(RedirectToPage("Error", new { error = e.Message }));
            }
        }
コード例 #12
0
        /// <summary>
        /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a &#x60;checkoutId&#x60; and &#x60;checkout_page_url&#x60; that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
        /// </summary>
        /// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="locationId">The ID of the business location to associate the checkout with.</param>
        /// <param name="body">An object containing the fields to POST for the request.  See the corresponding object definition for field details.</param>
        /// <returns>Task of ApiResponse (CreateCheckoutResponse)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <CreateCheckoutResponse> > CreateCheckoutAsyncWithHttpInfo(string locationId, CreateCheckoutRequest body)
        {
            // verify the required parameter 'locationId' is set
            if (locationId == null)
            {
                throw new ApiException(400, "Missing required parameter 'locationId' when calling CheckoutApi->CreateCheckout");
            }
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling CheckoutApi->CreateCheckout");
            }

            var    localVarPath         = "/v2/locations/{location_id}/checkouts";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new Dictionary <String, String>();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (locationId != null)
            {
                localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId));                     // path parameter
            }
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateCheckout", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <CreateCheckoutResponse>(localVarStatusCode,
                                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                            (CreateCheckoutResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateCheckoutResponse))));
        }
コード例 #13
0
        /// <summary>
        /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a &#x60;checkoutId&#x60; and &#x60;checkout_page_url&#x60; that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
        /// </summary>
        /// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="locationId">The ID of the business location to associate the checkout with.</param>
        /// <param name="body">An object containing the fields to POST for the request.  See the corresponding object definition for field details.</param>
        /// <returns>Task of CreateCheckoutResponse</returns>
        public async System.Threading.Tasks.Task <CreateCheckoutResponse> CreateCheckoutAsync(string locationId, CreateCheckoutRequest body)
        {
            ApiResponse <CreateCheckoutResponse> localVarResponse = await CreateCheckoutAsyncWithHttpInfo(locationId, body);

            return(localVarResponse.Data);
        }
コード例 #14
0
        /// <summary>
        /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a &#x60;checkoutId&#x60; and &#x60;checkout_page_url&#x60; that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
        /// </summary>
        /// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="locationId">The ID of the business location to associate the checkout with.</param>
        /// <param name="body">An object containing the fields to POST for the request.  See the corresponding object definition for field details.</param>
        /// <returns>CreateCheckoutResponse</returns>
        public CreateCheckoutResponse CreateCheckout(string locationId, CreateCheckoutRequest body)
        {
            ApiResponse <CreateCheckoutResponse> localVarResponse = CreateCheckoutWithHttpInfo(locationId, body);

            return(localVarResponse.Data);
        }
コード例 #15
0
        public ActionResult ChargeNonce()
        {
            string accessToken = "sandbox-sq0atb-D4TFGj4GmAew2U1yDuxe3Q";

            // Set the location ID
            string locId = "CBASECShk_d_mWkyYVT6bgiV52AgAQ";


            //Create configuration object for apiClient
            Square.Connect.Client.Configuration apiConfiguration = new Square.Connect.Client.Configuration();
            apiConfiguration.AccessToken = accessToken;

            //Create instance of api client
            Square.Connect.Client.ApiClient apiClient = new Square.Connect.Client.ApiClient(apiConfiguration);


            //Create instance of Orders api
            OrdersApi orderApi = new OrdersApi(apiConfiguration);

            //Create instance of Orders api
            CheckoutApi checkoutApi = new CheckoutApi(apiConfiguration);


            //Grab items from session and put them in a list
            List <Item> cartSession = (List <Item>)Session["cart"] != null ? (List <Item>)Session["cart"] : new List <Item>();


            //Create Line Item Request instance
            List <CreateOrderRequestLineItem> lineItems = new List <CreateOrderRequestLineItem>();

            //Create line item for each item stored in the cart session
            foreach (var item in cartSession)
            {
                int lineItemPrice = (int)(item.Product.ProductPrice * 100);

                Money price = new Money(lineItemPrice, Money.CurrencyEnum.USD);
                CreateOrderRequestLineItem lineItem = new CreateOrderRequestLineItem(item.Product.ProductTitle, item.Quantity.ToString(), price);

                lineItems.Add(lineItem);
            }

            string idempotencyKey = Guid.NewGuid().ToString();

            //Create new order request instance with cart items
            CreateOrderRequest orderRequest = new CreateOrderRequest(idempotencyKey, null, lineItems);

            //Get return URL
            //var urlBuilder =
            //new System.UriBuilder(Request.Url.AbsoluteUri)
            //{
            //    Path = Url.Action("PaymentConfirmation", "Products"),
            //    Query = null,
            //};

            //Uri uri = urlBuilder.Uri;
            //string url = urlBuilder.ToString();
            //UNCOMMENT AND CHANGE LAST NULL PARAMETER TO url


            CreateCheckoutRequest checkoutRequest = new CreateCheckoutRequest(idempotencyKey, orderRequest, true, null, null, null);

            try
            {
                var checkoutResponse = checkoutApi.CreateCheckout(locId, checkoutRequest);

                return(Redirect(checkoutResponse.Checkout.CheckoutPageUrl));
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #16
0
        public void CreateCheckoutTest()
        {
            CreateCheckoutRequest body = new CreateCheckoutRequest(
                IdempotencyKey: Guid.NewGuid().ToString(),
                Order: new CreateOrderRequest(
                    ReferenceId: "reference_id",
                    LineItems: new List <CreateOrderRequestLineItem>()
            {
                new CreateOrderRequestLineItem(
                    Name: "Printed T Shirt",
                    Quantity: "2",
                    BasePriceMoney: new Money(Amount: 1500, Currency: Money.CurrencyEnum.USD),
                    Discounts: new List <CreateOrderRequestDiscount>()
                {
                    new CreateOrderRequestDiscount(
                        Name: "7% off previous season item",
                        Percentage: "7"
                        ),
                    new CreateOrderRequestDiscount(
                        Name: "$3 off Customer Discount",
                        AmountMoney: new Money(300, Money.CurrencyEnum.USD)
                        )
                }
                    ),
                new CreateOrderRequestLineItem(
                    Name: "Slim Jeans",
                    Quantity: "1",
                    BasePriceMoney: new Money(Amount: 2500, Currency: Money.CurrencyEnum.USD)
                    ),
                new CreateOrderRequestLineItem(
                    Name: "Woven Sweater",
                    Quantity: "3",
                    BasePriceMoney: new Money(Amount: 3500, Currency: Money.CurrencyEnum.USD),
                    Discounts: new List <CreateOrderRequestDiscount>()
                {
                    new CreateOrderRequestDiscount(
                        Name: "$11 off Customer Discount",
                        AmountMoney: new Money(1100, Money.CurrencyEnum.USD)
                        )
                },
                    Taxes: new List <CreateOrderRequestTax>()
                {
                    new CreateOrderRequestTax(
                        Name: "Fair Trade Tax",
                        Percentage: "5"
                        )
                }
                    )
            },
                    Discounts: new List <CreateOrderRequestDiscount>()
            {
                new CreateOrderRequestDiscount(
                    Name: "Father's day 12% OFF",
                    Percentage: "12"
                    ),
                new CreateOrderRequestDiscount(
                    Name: "Global Sales $55 OFF",
                    AmountMoney: new Money(5500, Money.CurrencyEnum.USD)
                    )
            },
                    Taxes: new List <CreateOrderRequestTax>()
            {
                new CreateOrderRequestTax(
                    Name: "Sales Tax",
                    Percentage: "8.5"
                    )
            }
                    ),
                AskForShippingAddress: true,
                MerchantSupportEmail: "*****@*****.**",
                PrePopulateBuyerEmail: "*****@*****.**",
                PrePopulateShippingAddress: new Address(
                    AddressLine1: "1455 Market St.",
                    AddressLine2: "Suite 600",
                    Locality: "San Francisco",
                    AdministrativeDistrictLevel1: "CA",
                    PostalCode: "94103",
                    Country: Address.CountryEnum.US,
                    FirstName: "Jane",
                    LastName: "Doe"
                    ),
                RedirectUrl: "https://merchant.website.com/order-confirm"
                );
            var response = instance.CreateCheckout(locationId, body);

            Assert.IsInstanceOf <CreateCheckoutResponse> (response, "response is CreateCheckoutResponse");
            Assert.IsNull(response.Errors);
            Assert.True(response.Checkout.CheckoutPageUrl.StartsWith("https://connect.", StringComparison.Ordinal));
        }
コード例 #17
0
        /// <summary>
        /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a &#x60;checkoutId&#x60; and &#x60;checkout_page_url&#x60; that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
        /// </summary>
        /// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authorization">The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.</param>
        /// <param name="locationId">The ID of the business location to associate the checkout with.</param>
        /// <param name="body">An object containing the fields to POST for the request.  See the corresponding object definition for field details.</param>
        /// <returns>ApiResponse of CreateCheckoutResponse</returns>
        public ApiResponse <CreateCheckoutResponse> CreateCheckoutWithHttpInfo(string authorization, string locationId, CreateCheckoutRequest body)
        {
            // verify the required parameter 'authorization' is set
            if (authorization == null)
            {
                throw new ApiException(400, "Missing required parameter 'authorization' when calling CheckoutApi->CreateCheckout");
            }
            // verify the required parameter 'locationId' is set
            if (locationId == null)
            {
                throw new ApiException(400, "Missing required parameter 'locationId' when calling CheckoutApi->CreateCheckout");
            }
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling CheckoutApi->CreateCheckout");
            }

            var    localVarPath         = "/v2/locations/{location_id}/checkouts";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new Dictionary <String, String>();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            // set "format" to json by default
            // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
            localVarPathParams.Add("format", "json");
            if (locationId != null)
            {
                localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId));                     // path parameter
            }
            if (authorization != null)
            {
                localVarHeaderParams.Add("Authorization", Configuration.ApiClient.ParameterToString(authorization));                        // header parameter
            }
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateCheckout", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <CreateCheckoutResponse>(localVarStatusCode,
                                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                            (CreateCheckoutResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateCheckoutResponse))));
        }