Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

criação de fake checkout para interface de pagamento #11

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/TechLanches/TechLanches.API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
config.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));

// mover para extens�o
builder.Services.AddScoped<IPagamentoService, FakeCheckoutService>();
builder.Services.AddScoped<IClienteService, ClienteService>();
builder.Services.AddScoped<IClienteRepository, ClienteRepository>();

Expand Down
20 changes: 20 additions & 0 deletions src/TechLanches/TechLanches.Application/IPagamentoService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace TechLanches.Application;

public interface IPagamentoService
{
Task<bool> RealizarPagamento(int pedidoId, FormaPagamento formaPagamento, decimal valor);
}

public class FakeCheckoutService : IPagamentoService
{
public Task<bool> RealizarPagamento(int pedidoId, FormaPagamento formaPagamento, decimal valor)
{
//salvar informação de pagamento
return Task.FromResult(true);
}
}

public enum FormaPagamento
{
QrCodeMercadoPago
}