Ejemplo n.º 1
0
 public void LoadCardsOnPopup(PaymentListModel paymentListModel)
 {
     Number        = (paymentListModel.CARD_NUMBER ?? "").ToString();
     Chname        = paymentListModel.CARD_HOLDER_NAME;
     SelectedMonth = paymentListModel.CARD_EXP_DATE;
     if (!(SelectedMonth == null))
     {
         SelectedMonth = SelectedMonth.Substring(0, 2);
     }
     SelectedYear = paymentListModel.CARD_EXP_DATE;
     if (!(SelectedYear == null))
     {
         SelectedYear = "20" + SelectedYear.Substring(2, 2);
     }
 }
Ejemplo n.º 2
0
        private async Task SaveCardAsync()
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                paymentListModel.CARD_NUMBER      = Convert.ToInt64(Number);
                paymentListModel.CARD_HOLDER_NAME = Chname;
                paymentListModel.CARD_EXP_DATE    = SelectedMonth + SelectedYear.Substring(2, 2);
                var ResultContent = await _apiServicesPayment.SaveCardAsync(paymentListModel);

                JObject jwtDynamic = JsonConvert.DeserializeObject <dynamic>(ResultContent);
                var     Message    = jwtDynamic.Value <string>("Message");
                if (Message.Equals("Card Saved."))
                {
                    await PopupNavigation.Instance.PopAsync();
                }
            }
        }