Esempio n. 1
0
        public void TokenPreAuth(TokenPaymentViewModel payment, JudoSuccessCallback success, JudoFailureCallback failure)
        {
            var vc = GetCurrentViewController();

            if (JudoSDKManager.UIMode && vc == null)
            {
                var error = new JudoError {
                    Exception = new Exception("Navigation controller cannot be null with UIMode enabled.")
                };
                failure(error);
            }
            else
            {
                var view = _viewLocator.GetTokenPreAuthView();
                view.successCallback = success;
                view.failureCallback = failure;
                view.tokenPayment    = payment;
                PresentView(vc as UINavigationController, view);
            }
        }