Question: I am testing Stripe on my site but cannot get through the 'try' seen below. Basically, I never see the "TEST" after the 'try'.

Am I doing something wrong here?

```
   try {
$charge = Stripe_Charge::create(array(
  "amount" => 50, // amount in cents, again
  "currency" => "usd",
  "customer" => $customer->id,
  "card" => $token,
  "description" => $email));
echo "TEST1";
} catch (Stripe_CardError $e) {
    // Since it's a decline, Stripe_CardError will be caught
    $body = $e->getJsonBody();
    $err  = $body['error'];
    echo 'Status is:' . $e->getHttpStatus() . "\n";
    echo 'Type is:' . $err['type'] . "\n";
    echo 'Code is:' . $err['code'] . "\n";
    // param is '' in this case
    echo 'Param is:' . $err['param'] . "\n";
    echo 'Message is:' . $err['message'] . "\n";
}
echo "TEST";

```

Thanks!

Answer: 
It's not likely that you're getting another error -- if you were, you would be seeing an uncaught error exception. That being said, you should, as periklis suggested, be catching other types of exceptions as well.

What is most likely happening is that a Stripe\_CardError *is* being thrown and caught, but because you're not echoing anything in the catch statement, it's failing silently. Try this:

```
} catch (Stripe_CardError $e) {
    // Since it's a decline, Stripe_CardError will be caught
    $body = $e->getJsonBody();
    $err  = $body['error'];

    echo 'Status is:' . $e->getHttpStatus() . "\n";
    echo 'Type is:' . $err['type'] . "\n";
    echo 'Code is:' . $err['code'] . "\n";
    // param is '' in this case
    echo 'Param is:' . $err['param'] . "\n";
    echo 'Message is:' . $err['message'] . "\n";
} catch (Exception $e) {
    echo $e->getMessage();
} catch (ErrorException $e) {
    echo $e->getMessage();
}

```

EDIT 4/16/13 - You indicated in a comment that you weren't even seeing your echo in the try statement. So either a) your echo statements are hidden from view, or b) the code block prior to it is failing. However, since you're not catching a Stripe\_CardError, it has to be a different type of exception. My guess now is that there's a problem with one of the variables you're passing into the Stripe function... either undeclared or trying to access property of non-object.

Add the other catch statements and see if you get anything. The only way you could not be getting to your last echo statement is if an uncaught exception is being thrown... You're just not seeing it.

This is a shot in the dark, but is it possible that your php environment has exception reporting suppressed or handled in some other way that's not obvious? Sometimes a production environment is set up to ignore or log exceptions, rather than display them to the user. Check into that, because and if you're not seeing it, it's being caught somewhere else and logged or hidden from view.

Try inserting this somewhere BEFORE your try catch:

```
ini_set('error_reporting', E_ALL);

```
I know this is a late reply, but I was getting the exact same issue. I tried echoing after every line of code, and the echos stopped coming after the charge was attempted, I had my "amount" set to 10 CENTS (stupidly), where it should have been 10 EURO (1000), stripe must not allow such small charges, it worked once I increased the amount to 1000 cent. 

```
$charge = Stripe_Charge::create(array(
  "amount" => 50, // amount in cents, again <<THIS IS WHAT CAUSED MY ISSUE!!
  "currency" => "usd",
  "customer" => $customer->id,
  "card" => $token,
  "description" => $email));

```