From 4fedfe317cd6a40999c441d3169fd87a6460bc09 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Mon, 11 Nov 2024 20:29:59 +0100 Subject: [PATCH] Fix url provider --- src/Provider/AfterUrlProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Provider/AfterUrlProvider.php b/src/Provider/AfterUrlProvider.php index 55f66ed..58a4de1 100644 --- a/src/Provider/AfterUrlProvider.php +++ b/src/Provider/AfterUrlProvider.php @@ -16,9 +16,9 @@ public function __construct( public function getUrl(PaymentRequestInterface $paymentRequest, string $type): string { - $payload = $paymentRequest->getPayload(); - Assert::isArray($payload, 'The payment request payload must be an array.'); + $responseData = $paymentRequest->getResponseData(); + Assert::isArray($responseData, 'The payment request responseData must be an array.'); - return $payload[$type] ?? $this->defaultAfterPayUrlProvider->getUrl($paymentRequest, $type); + return $responseData[$type] ?? $this->defaultAfterPayUrlProvider->getUrl($paymentRequest, $type); } }