private void WebviewClient_Navigated(object sender, NavigatedEventArgs e)
        {
            if (e.Url == null)
            {
                return;
            }

            if (e.Url.ToLower().Contains("success"))
            {
                Intent intent = new Intent(this, typeof(CreditCardSuccessActivity));
                intent.AddFlags((Intent.Flags & ActivityFlags.ClearTop) | (Intent.Flags & ActivityFlags.ClearTask) | (Intent.Flags & ActivityFlags.NewTask));
                StartActivity(intent);
                Finish();
            }
            else
            {
                if (!e.Url.ToLower().Contains("declined"))
                {
                    return;
                }

                Intent intent = new Intent(this, typeof(CreditCardDeclinedActivity));
                intent.AddFlags((Intent.Flags & ActivityFlags.ClearTop) | (Intent.Flags & ActivityFlags.ClearTask) | (Intent.Flags & ActivityFlags.NewTask));
                StartActivity(intent);
                Finish();
            }
        }
Beispiel #2
0
        public override void OnPageFinished(WebView view, string url)
        {
            var args = new NavigatedEventArgs(url);

            Navigated?.Invoke(this, args);

            base.OnPageFinished(view, url);
        }