示例#1
0
        public void TokenPayment(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.GetTokenPaymentView();
                view.successCallback = success;
                view.failureCallback = failure;
                view.tokenPayment    = payment;
                PresentView(vc as UINavigationController, view);
            }
        }