private async void CheckoutWithCreditCard(object sender, EventArgs e) { // First, the credit card must be stored on the checkout if (await AddCreditCardToCheckoutAsync()) { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; // Upon successfully adding the credit card to the checkout, complete checkout must be called immediately try { Checkout = await client.CompleteCheckoutAsync(Checkout); Console.WriteLine("Successfully completed checkout"); UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; try { Status status; while ((status = await client.GetCompletionStatusOfCheckoutAsync(Checkout)) == Status.Processing) { await Task.Delay(500); } UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; Console.WriteLine("Successfully got completion status: {0}", status); await GetCompletedCheckoutAsync(); } catch (NSErrorException ex) { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; Console.WriteLine("Error getting completion status: {0}", ex.Error); } } catch (NSErrorException ex) { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; Console.WriteLine("Error completing checkout: {0}", ex.Error); } } }