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);