コード例 #1
0
 public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
 {
     if (url.Scheme.Equals(PayPalUrlScheme, StringComparison.InvariantCultureIgnoreCase))
     {
         return(BTAppSwitch.HandleOpenURL2(url, sourceApplication: sourceApplication));
     }
     return(false);
 }
コード例 #2
0
        public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
        {
            if (url.Scheme.Equals(PayPalUrlScheme, StringComparison.InvariantCultureIgnoreCase))
            {
                return(BTAppSwitch.HandleOpenURL(url, options: options));
            }

            return(false);
        }
コード例 #3
0
        public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
        {
            if (url.Scheme.Equals(BraintreeDemoAppDelegatePaymentsURLScheme, System.StringComparison.OrdinalIgnoreCase))
            {
                return(BTAppSwitch.HandleOpenURL(url, options));
            }

            return(true);
        }
コード例 #4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            BTAppSwitch.SetReturnURLScheme(PayPalUrlScheme);

            return(base.FinishedLaunching(app, options));
        }
コード例 #5
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            var pleasantGrey = UIColor.FromWhiteAlpha(42 / 255.0f, 1.0f);

            UIToolbar.Appearance.BarTintColor = pleasantGrey;

            //BTTokenizationService.SharedService()
            //                     .RegisterType("PayPalx",(client, data, subblock) => {
            //    var driver = new BraintreePayPal.BTPayPalDriver(client);
            //});

            BraintreePayPal.BraintreePayPalLinker.Init();

            var paypal = BTTokenizationService.SharedService().IsTypeAvailable("PayPal");

            System.Diagnostics.Debug.WriteLine($"Paypal: {paypal}");

            BTAppSwitch.SetReturnURLScheme(BraintreeDemoAppDelegatePaymentsURLScheme);

            return(true);
        }