diff --git a/Gateway/Http/Client/TransactionCapture.php b/Gateway/Http/Client/TransactionCapture.php index 332a07ca5..50aae7816 100644 --- a/Gateway/Http/Client/TransactionCapture.php +++ b/Gateway/Http/Client/TransactionCapture.php @@ -105,10 +105,14 @@ private function placeMultipleCaptureRequests($service, $requestContainer, $requ $singleResponse = $this->copyParamsToResponse($singleResponse, $request); $response[self::MULTIPLE_AUTHORIZATIONS][] = $singleResponse; } catch (AdyenException $e) { + $pspReference = isset($request[OrderPaymentInterface::PSPREFRENCE]) ? + $request[OrderPaymentInterface::PSPREFRENCE] : + 'pspReference not set'; + $message = sprintf( 'Exception occurred when attempting to capture multiple authorizations. Authorization with pspReference %s: %s', - $request[OrderPaymentInterface::PSPREFRENCE], + $pspReference, $e->getMessage() );