public async void ItemClicked(object sender, EventArgs e) { try { var button = sender as Button; CheckoutPage.coupon = button.CommandParameter as Coupon; var response = await CartLogic.ApplyCoupon(Application.Current.Properties["user_id"].ToString(), CheckoutPage.coupon.id.ToString()); if (response.status == 200) { await Navigation.PopAsync(); } else { await DisplayAlert("Alert", response.message, "Ok"); } } catch { } }