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); } }