public override void GetNoncenBrainTree(BrainTreeCard brainTreeCard, Action <object> action) { try { BraintreeFragment mBraintreeFragment = BraintreeFragment.NewInstance(MainActivity, brainTreeCard.Token); PaymentMethodNonceListener paymentMethodNonceListener = new PaymentMethodNonceListener(); paymentMethodNonceListener.Callback += (sender, e) => { if (e is PaymentMethodNonce) { string nouce = (e as PaymentMethodNonce).Nonce; action(nouce); } else { if (action != null) { action(e); } } }; mBraintreeFragment.AddListener(paymentMethodNonceListener); var cardBuilder = new CardBuilder() .CardNumber(brainTreeCard.CardNumber) .Cvv(brainTreeCard.Cvv) .PostalCode(brainTreeCard.PostalCode) .ExpirationDate(brainTreeCard.ExpirationDate.ToString("MM/yyyy")); cardBuilder.Validate(false); Card.Tokenize(mBraintreeFragment, cardBuilder); } catch (Exception e) { ExceptionHandler.Catch(e); } }