Exemple #1
0
        // When the user selects a product, create a new checkout for that product.
        private void CreateCheckout(Product product)
        {
            ShowLoadingDialog(Resource.String.syncing_data);

            SampleApplication.CreateCheckout(product, (checkout, response) =>
            {
                DismissLoadingDialog();

                // If the selected product requires shipping, show the list of shipping rates so the user can pick one.
                // Otherwise, skip to the discounts activity (gift card codes and discount codes).
                if (checkout.RequiresShipping)
                {
                    StartActivity(new Intent(this, typeof(ShippingRateListActivity)));
                }
                else
                {
                    StartActivity(new Intent(this, typeof(DiscountActivity)));
                }
            }, OnError);
        }