Ok, solved this one myself. If anyone has the same problem in the future, this was my solution:
try {
$charge = \Stripe\Charge::create([
"amount" => $grandTotal,
"currency" => 'usd',
"source" => $request->stripeToken,
"description" => '$description'
]
);
} catch (\Stripe\Error\Card $e) {
return redirect::refresh->withFlashMessage($e->getMessage());
} catch (\Stripe\Error\InvalidRequest $e) {
return redirect::refresh->withFlashMessage($e->getMessage());
} catch (\Stripe\Error\Authentication $e) {
return redirect::refresh->withFlashMessage($e->getMessage());
} catch (\Stripe\Error\ApiConnection $e) {
return redirect::refresh->withFlashMessage($e->getMessage());
} catch (\Stripe\Error\Base $e) {
return redirect::refresh->withFlashMessage($e->getMessage());
} catch (Exception $e) {
return redirect::refresh->withFlashMessage($e->getMessage());
}
Basically there are multiple errors that need to be caught, you need to catch them all. Like Pokemon.