Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fail after all attempts to find order fail #17

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Jobs/Webhooks/WebhookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$this->fail($e);
}

return $event;

Check failure on line 52 in src/Jobs/Webhooks/WebhookHandler.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $event might not be defined.
}

/**
Expand All @@ -57,7 +57,7 @@
*/
protected function getPaymentIntentFromEvent(Event $event): PaymentIntentContract
{
return new PaymentIntent(intent: $event->data->object);

Check failure on line 60 in src/Jobs/Webhooks/WebhookHandler.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to an undefined property Stripe\StripeObject::$object.
}

/**
Expand All @@ -82,25 +82,25 @@

return $order;
} catch (Throwable $e) {
$this->fail($e);
// $this->fail($e);
}

try {
$order = App::make(FindOrderByTransaction::class)($paymentIntent);

return $order;
} catch (Throwable $e) {
$this->fail($e);
// $this->fail($e);
}

try {
$order = App::make(FindOrderByCartIntent::class)($paymentIntent);

return $order;
} catch (Throwable $e) {
$this->fail($e);
// $this->fail($e);
}

$this->fail(new ModelNotFoundException('Order not found.'));

Check failure on line 104 in src/Jobs/Webhooks/WebhookHandler.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Dystcz\LunarApiStripeAdapter\Jobs\Webhooks\WebhookHandler::findOrder() should return Lunar\Models\Order but return statement is missing.
}
}
Loading