Skip to content

Commit

Permalink
check if psp reference is set
Browse files Browse the repository at this point in the history
  • Loading branch information
RokPopov committed Oct 24, 2023
1 parent 2454b7f commit 2221129
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Gateway/Http/Client/TransactionCapture.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);

Expand Down

0 comments on commit 2221129

Please sign in to comment.