public void RequestCardData(Action onCancelled, Action <Xamarin.PayPal.Android.CardIO.Payment.CreditCard, Bitmap> onSuccess, PayPal.Forms.Abstractions.Enum.CardIOLogo scannerLogo) { RetrieveCardCancelled = onCancelled; RetrieveCardSuccess = onSuccess; Intent intent = new Intent(Context, typeof(CardIOActivity)); switch (scannerLogo) { case Abstractions.Enum.CardIOLogo.CardIO: intent.PutExtra(CardIOActivity.ExtraHideCardioLogo, false); intent.PutExtra(CardIOActivity.ExtraUseCardioLogo, true); break; case Abstractions.Enum.CardIOLogo.None: intent.PutExtra(CardIOActivity.ExtraHideCardioLogo, true); intent.PutExtra(CardIOActivity.ExtraUseCardioLogo, false); break; } intent.PutExtra(CardIOActivity.ExtraReturnCardImage, true); intent.PutExtra(CardIOActivity.ExtraRequireExpiry, true); intent.PutExtra(CardIOActivity.ExtraRequireCvv, true); (Context as Activity).StartActivityForResult(intent, REQUEST_CODE_CARD_SCAN); }
public void RequestCardData(Action onCancelled, Action <CardIOCreditCardInfo> onSuccess, PayPal.Forms.Abstractions.Enum.CardIOLogo scannerLogo) { RetrieveCardCancelled = onCancelled; RetrieveCardSuccess = onSuccess; var scanViewController = new CardIOPaymentViewController(new CustomCardIOPaymentViewControllerDelegate(this)); switch (scannerLogo) { case Abstractions.Enum.CardIOLogo.CardIO: scanViewController.HideCardIOLogo = false; scanViewController.UseCardIOLogo = true; break; case Abstractions.Enum.CardIOLogo.None: scanViewController.HideCardIOLogo = true; scanViewController.UseCardIOLogo = false; break; } var top = GetTopViewController(UIApplication.SharedApplication.KeyWindow); top.PresentViewController(scanViewController, true, null); }