Skip to content

Commit 4eb4602

Browse files
PLGMAG2V2-545: Log POST body and headers on fail (#539)
* PLGMAG2V2-545: Log POST body and headers on fail * Fix phpcs * Update PHPDOC * PLGMAG2V2-545: Fix type of the second argument of the sprintf statement Co-authored-by: Daniel Civit <daniel.civit@multisafepay.com>
1 parent 382ac2e commit 4eb4602

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Logger/Logger.php

+18
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,22 @@ public function logApplePayGetMerchantSessionException(Exception $exception): vo
272272
)
273273
);
274274
}
275+
276+
/**
277+
* Log the failed POST notification body and headers
278+
*
279+
* @param string $headers
280+
* @param string $body
281+
* @throws Exception
282+
*/
283+
public function logFailedPOSTNotification(string $headers, string $body): void
284+
{
285+
$this->debug(
286+
sprintf(
287+
'(Failed POST notification) Headers: %1$s, Body: %2$s',
288+
$headers,
289+
$body
290+
)
291+
);
292+
}
275293
}

0 commit comments

Comments
 (0)