From dd04fe43033219dd0b1dc0a26a66dc84c8f10dfb Mon Sep 17 00:00:00 2001 From: Nicolas MELONI Date: Thu, 22 May 2025 09:01:12 +0200 Subject: [PATCH] PPSYL-143 - Payment id is sent in the "id" key not "payment_id". --- src/Controller/IpnAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/IpnAction.php b/src/Controller/IpnAction.php index 96476050..f914bc72 100644 --- a/src/Controller/IpnAction.php +++ b/src/Controller/IpnAction.php @@ -68,11 +68,11 @@ public function __invoke(Request $request): JsonResponse $details = ArrayObject::ensureArrayObject($content); // if we are too fast canceling a payment before we got an answer from PayPlug gateway - if (null === $details['payment_id']) { + if (null === $details['id']) { return new JsonResponse(null, Response::HTTP_UNAUTHORIZED); } - $payment = $this->paymentRepository->findOneByPayPlugPaymentId($details['payment_id']); + $payment = $this->paymentRepository->findOneByPayPlugPaymentId($details['id']); $paymentMethod = $payment->getMethod(); Assert::isInstanceOf($paymentMethod, PaymentMethodInterface::class);