Braintree.Api.BraintreeFragment.AuthorizePaypalPaymentAsync C# (CSharp) Метод

AuthorizePaypalPaymentAsync() публичный Метод

public AuthorizePaypalPaymentAsync ( bool requestBillingAgreement, string additionalParameters = null, PayPalRequest request = null ) : Task
requestBillingAgreement bool
additionalParameters string
request PayPalRequest
Результат Task
        public async Task<PaymentMethodNonce> AuthorizePaypalPaymentAsync(bool requestBillingAgreement, string[] additionalParameters = null, PayPalRequest request = null)
        {
            var actionListener = new PaymentMethodNonceListener();
            try
            {
                AddListener(actionListener);

                PayPal.AuthorizeAccount(this, additionalParameters);

                if (requestBillingAgreement)
                {
                    PayPal.RequestBillingAgreement(this, request??new PayPalRequest());
                }

                return await actionListener.Task();
            }
            finally
            {
                RemoveListener(actionListener);
            }
        }