Exemple #1
0
        public void CreatePremium(PolicyRenewalModel renewal)
        {
            ImisPayment payment      = new ImisPayment(_configuration, _hostingEnvironment, _loggerFactory);
            var         paymentLogic = new PaymentLogic(_configuration, _hostingEnvironment, _loggerFactory);

            if (_configuration.GetValue <bool>("PaymentGateWay:CreatePremiumOnPaymentReceived"))
            {
                int paymentId = payment.GetPaymentId(renewal.ControlNumber);
                _ = paymentLogic.CreatePremium(paymentId);
            }
        }
        public void CreatePremium(EnrolFamilyModel model)
        {
            ImisPayment  payment      = new ImisPayment(_configuration, _hostingEnvironment, _loggerFactory);
            PaymentLogic paymentLogic = new PaymentLogic(_configuration, _hostingEnvironment, _loggerFactory);

            if (_configuration.GetValue <bool>("PaymentGateWay:CreatePremiumOnPaymentReceived"))
            {
                foreach (var family in model.Family)
                {
                    foreach (var policy in family.Policies)
                    {
                        int paymentId = payment.GetPaymentId(policy.ControlNumber);
                        _ = paymentLogic.CreatePremium(paymentId);
                    }
                }
            }
        }