Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavofg1pontes committed Oct 7, 2024
1 parent f632522 commit 6afa045
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
package br.com.ifsp.tickets.infra.config.app;
import br.com.ifsp.tickets.app.payment.PaymentService;
import br.com.ifsp.tickets.app.payment.PaymentServiceFactory;
import br.com.ifsp.tickets.domain.event.sale.ITicketSaleGateway;
import br.com.ifsp.tickets.domain.ticket.ITicketGateway;
import br.com.ifsp.tickets.domain.ticket.payment.IPaymentGateway;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Component
@Configuration
@RequiredArgsConstructor(onConstructor_ = @__(@Autowired))
public class MercadoPagoConfig {
private final ITicketSaleGateway ticketSaleGateway;
private final ITicketGateway ticketGateway;
private final IPaymentGateway paymentGateway;

@Value("${mercadopago.access.token}")
private String mercadoPagoAccessToken;
Expand All @@ -26,10 +17,4 @@ public class MercadoPagoConfig {
public void initialize() {
com.mercadopago.MercadoPagoConfig.setAccessToken(mercadoPagoAccessToken);
}

@Bean
public PaymentService paymentService() {
System.out.println("AAAAAAAAAAAAAAAAAAAA: " + this.mercadoPagoAccessToken);
return PaymentServiceFactory.create(ticketGateway, ticketSaleGateway, paymentGateway);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.HashMap;

public record CreateTicketSaleRequest(
@JsonProperty("name") String name,
@JsonProperty("description") String description,
Expand Down

0 comments on commit 6afa045

Please sign in to comment.