Closed kezern closed 7 years ago
I'm developing an application using laravel and Crudbooster. I want to catch card exceptions. I have this code. try{ $stripe = Stripe::make($key);
$token = $stripe->tokens()->create([ 'card' => [ 'number' => $cobro->tarjeta, 'exp_month' => $card_date[0], 'cvc' => $cobro->cvv, 'exp_year' => '20'.$card_date[1], ], ]); //Log::info('token: '.print_r($token, true)); $charge = $stripe->accountId('acct_XXXXXXXXXX')->charges()->create([ 'currency' => 'EUR', 'amount' => $cobro->importe, 'source' => $token['id'], 'description' => $cobro->descripcion, //'source' => 'tok_es', "application_fee" => $application_fee, ]); }catch(Cartalyst\Stripe\Exception\CardErrorException $e){ Log::error("Se ha procudido una excepcion ".$e->getMessage()); }
But exception is not catched and Whoops error of laravel is shown
Duplicate of #17
Thanks! Sorry I didn't find that
I'm developing an application using laravel and Crudbooster. I want to catch card exceptions. I have this code. try{
$stripe = Stripe::make($key);
But exception is not catched and Whoops error of laravel is shown