Skip to content

Commit

Permalink
PT-1131 converted spaces to tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
tikohov20 committed Mar 13, 2024
1 parent 384bd13 commit baf59ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Mondu/Mondu/Controllers/OrdersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function confirm( WP_REST_Request $request ) {
$order = Helper::get_order_from_order_number_or_uuid( $order_number, $mondu_order_id );

try {
if (!$order) {
if ( !$order ) {
throw new \Exception(__('Order not found'));
}

Expand Down
6 changes: 3 additions & 3 deletions src/Mondu/Mondu/Controllers/WebhooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function index( WP_REST_Request $request ) {
$params = $request->get_json_params();
$topic = isset($params['topic']) ? $params['topic'] : null;

$body = $request->get_body();
$signature_payload = $request->get_header('X-MONDU-SIGNATURE');
$signature = $verifier->create_hmac($body);
$body = $request->get_body();
$signature_payload = $request->get_header('X-MONDU-SIGNATURE');
$signature = $verifier->create_hmac($body);

Helper::log([
'webhook_topic' => $topic,
Expand Down
2 changes: 1 addition & 1 deletion src/Mondu/Mondu/Models/SignatureVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function set_secret( $secret ) {
}

public function create_hmac( $payload ) {
return hash_hmac('sha256', $payload, $this->secret);
return hash_hmac('sha256', $payload, $this->secret);
}


Expand Down

0 comments on commit baf59ae

Please sign in to comment.