//Stripe private void BtnApplyOnClick(object sender, EventArgs e) { try { //Show a progress AndHUD.Shared.Show(this, GetText(Resource.String.Lbl_Loading)); Integer month = null; Integer year = null; if (!string.IsNullOrEmpty(EtCardNumber.Text) || !string.IsNullOrEmpty(EtExpire.Text) || !string.IsNullOrEmpty(EtCvv.Text) || !string.IsNullOrEmpty(EtName.Text)) { var split = CardExpire.Text.Split('/'); if (split.Length == 2) { month = (Integer)Convert.ToInt32(split[0]); year = (Integer)Convert.ToInt32(split[1]); } Card card = new Card(EtCardNumber.Text, month, year, EtCvv.Text); Stripe.CreateToken(card, this); } else { Toast.MakeText(this, GetText(Resource.String.Lbl_PleaseVerifyDataCard), ToastLength.Long).Show(); } } catch (Exception exception) { AndHUD.Shared.Dismiss(this); Console.WriteLine(exception); } }
//Stripe private void BtnApplyOnClick(object sender, EventArgs e) { try { //Show a progress //AndHUD.Shared.Show(this, GetText(Resource.String.Lbl_Loading)); if (MultilineWidget.Card.ValidateCard() && !string.IsNullOrEmpty(EtName.Text)) { Card card = MultilineWidget.Card; Stripe.CreateToken(card, PaymentConfiguration.Instance.PublishableKey, this); } else { Toast.MakeText(this, GetText(Resource.String.Lbl_PleaseVerifyDataCard), ToastLength.Long)?.Show(); } } catch (Exception exception) { AndHUD.Shared.Dismiss(this); Methods.DisplayReportResultTrack(exception); } }