fix(billing): widen tracking exception catch so post-payment page never crashes
`$account->stripe()` can throw `\Stripe\Exception\InvalidArgumentException` (descends from PHP's `InvalidArgumentException`, not `ApiErrorException`) when the Stripe key is missing/malformed. Since the conversion data is purely for tracking, any failure must degrade silently — not break the post-payment success page.
This commit is contained in:
parent
4efc6f467d
commit
eebe510a31
1 changed files with 2 additions and 2 deletions
|
|
@ -11,8 +11,8 @@
|
|||
use Illuminate\Support\Facades\Gate;
|
||||
use Inertia\Inertia;
|
||||
use Inertia\Response;
|
||||
use Stripe\Exception\ApiErrorException as StripeApiErrorException;
|
||||
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
|
||||
use Throwable;
|
||||
|
||||
class BillingController extends Controller
|
||||
{
|
||||
|
|
@ -101,7 +101,7 @@ private function buildConversionData(Account $account, string $sessionId): ?arra
|
|||
$sessionId,
|
||||
['expand' => ['line_items.data.price']],
|
||||
);
|
||||
} catch (StripeApiErrorException) {
|
||||
} catch (Throwable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue