Skip to content

Commit d449a2b

Browse files
PT-1775: Webhooks attempts fail due to 401 Invalid signature (#22)
1 parent 93318e7 commit d449a2b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Controller/MonduWebhooksController.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ private function handleRequest(Request $request): Response
4040

4141
$signature = hash_hmac('sha256', $content, $this->_config->getWebhooksSecret());
4242
if ($signature !== $headers->get('X-Mondu-Signature')) {
43+
$this->_logger->debug('MonduWebhooksController [WebhooksSecret]: ' . print_r($this->_config->getWebhooksSecret(), true));
44+
$this->_logger->debug('MonduWebhooksController [Content]: ' . print_r($content, true));
45+
$this->_logger->debug('MonduWebhooksController [X-Mondu-Signature]: ' . print_r($headers->get('X-Mondu-Signature'), true));
46+
$this->_logger->debug('MonduWebhooksController [Signature]: ' . print_r($signature, true));
47+
4348
return new Response('Invalid signature', 401);
4449
}
4550

4651
$params = json_decode($content, true);
47-
48-
$this->_logger->debug('MonduWebhooksController [handleRequest $params]: ' . print_r($params, true));
4952
[$resBody, $resStatus] = $this->_webhookHandler->handleWebhook($params);
5053

51-
$this->_logger->debug('MonduWebhooksController [handleRequest $resBody]: ' . print_r($resBody, true));
52-
$this->_logger->debug('MonduWebhooksController [handleRequest $resStatus]: ' . print_r($resStatus, true));
53-
5454
return new Response(
5555
json_encode($resBody),
5656
$resStatus,

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mondu/bnpl-checkout-oxid",
33
"description": "Mondu payment method for the OXID eShop.",
44
"type": "oxideshop-module",
5-
"version": "1.1.5",
5+
"version": "1.1.6",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"

metadata.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'en' => 'Module for Mondu payment.',
1111
),
1212
'thumbnail' => 'out/src/images/logo.png',
13-
'version' => '1.1.5',
13+
'version' => '1.1.6',
1414
'author' => 'Mondu GmbH',
1515
'url' => 'https://www.mondu.ai',
1616
'email' => '[email protected]',

0 commit comments

Comments
 (0)