Esempio n. 1
0
        private static async Task <ReturnModel> SendPaymentIfValid(Tuple <DTOInsertPayment, string> content)
        {
            var manager = await GetAllowedContact(content.Item2);

            if (manager == null)
            {
                return(null);
            }
            var credentials = DiscoveryFactory.GetDefaultCreditenals();

            using (var client = new PaymentClient(ConfigurationContainer.Configuration["DiscoveryUrl"], credentials.ClientId, credentials.ClientSecret))
            {
                content.Item1.OperatorId = manager.Id;
                return(await client.AddPayment(content.Item1));
            }
        }