diff --git a/backend/src/main/kotlin/net/perfectdreams/perfectpayments/backend/routes/api/v1/callbacks/PostMercadoPagoCallbackRoute.kt b/backend/src/main/kotlin/net/perfectdreams/perfectpayments/backend/routes/api/v1/callbacks/PostMercadoPagoCallbackRoute.kt index ee53954..37befde 100644 --- a/backend/src/main/kotlin/net/perfectdreams/perfectpayments/backend/routes/api/v1/callbacks/PostMercadoPagoCallbackRoute.kt +++ b/backend/src/main/kotlin/net/perfectdreams/perfectpayments/backend/routes/api/v1/callbacks/PostMercadoPagoCallbackRoute.kt @@ -32,7 +32,7 @@ class PostMercadoPagoCallbackRoute(val m: PerfectPayments) : BaseRoute("/api/v1/ logger.info { "MercadoPago type: $type, params: ${parameters.entries()}; body: $body" } val topic = parameters["topic"] - if (type != null) { + if (type == null) { logger.warn { "Ignoring MercadoPago request with type missing because maybe that's a IPN notification and we only care about webhooks..." } call.respondEmptyJson(HttpStatusCode.Forbidden) return