Beispiel #1
0
        //■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

        public EasyPay(IServiceCollection services, string connectionString)
        {
            Image = "location";

            EasyPayDbContext.Configure(connectionString);

            RequiredConfigurationFields = new FluentList <ProviderConfiguration>()
                                          .Add(new ProviderConfiguration(nameof(Image)));
        }
Beispiel #2
0
        //■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

        public string Create(string invoiceId, decimal amount)
        {
            //Payment Logic
            using var context = new EasyPayDbContext();
            var paypal = new BoletoBancario {
                Image = "ImgBoleto"
            };

            context.BoletoBancarioPayments.Add(paypal);
            context.SaveChanges();

            return($"PaymentID: {paypal.Id}");
        }
Beispiel #3
0
        //═════════════════════════════════════════════════════════════════════════════════════════

        public Dictionary <string, object> Get(string paymentId)
        {
            using var context = new EasyPayDbContext();
            return(context.BoletoBancarioPayments.FirstOrDefault().ToDictionary());
        }
Beispiel #4
0
 /// <summary>Initializes a new instance of the Ulacit.Mandiola.DB.Concrete.PaymentMethod class.</summary>
 /// <param name="mapper">The mapper.</param>
 public PaymentMethod(IMapper mapper)
 {
     _mapper           = mapper;
     _easyPayDbContext = new EasyPayDbContext();
 }
        //═════════════════════════════════════════════════════════════════════════════════════════

        public Dictionary <string, object> Get(string paymentId)
        {
            using var context = new EasyPayDbContext();
            return(context.VisaMastercardPayments.FirstOrDefault().ToDictionary());
        }
 /// <summary>Initializes a new instance of the Ulacit.Mandiola.DB.Concrete.UserEasyPayContext class.</summary>
 /// <param name="mapper">The mapper.</param>
 public UserEasyPayContext(IMapper mapper)
 {
     _mapper           = mapper;
     _easyPayDbContext = new EasyPayDbContext();
 }