//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ public EasyPay(IServiceCollection services, string connectionString) { Image = "location"; EasyPayDbContext.Configure(connectionString); RequiredConfigurationFields = new FluentList <ProviderConfiguration>() .Add(new ProviderConfiguration(nameof(Image))); }
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 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}"); }
//═════════════════════════════════════════════════════════════════════════════════════════ public Dictionary <string, object> Get(string paymentId) { using var context = new EasyPayDbContext(); return(context.BoletoBancarioPayments.FirstOrDefault().ToDictionary()); }
/// <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(); }