During my testing of STRIPE in a website, I built the code like this:
try { $charge = Stripe_Charge::create(array( \"amount\" => $cli
If you're using the Stripe PHP libraries and they have been namespaced (such as when they're installed via Composer) you can catch all Stripe exceptions with:
getMessage()); } catch (Exception $e) { // Catch any other non-Stripe exceptions }