Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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.</p> <p>What is most likely happening is that a Stripe_CardError <em>is</em> being thrown and caught, but because you're not echoing anything in the catch statement, it's failing silently. Try this:</p> <pre><code>} catch (Stripe_CardError $e) { // Since it's a decline, Stripe_CardError will be caught $body = $e-&gt;getJsonBody(); $err = $body['error']; echo 'Status is:' . $e-&gt;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-&gt;getMessage(); } catch (ErrorException $e) { echo $e-&gt;getMessage(); } </code></pre> <p>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.</p> <p>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.</p> <p>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.</p> <p>Try inserting this somewhere BEFORE your try catch:</p> <pre><code>ini_set('error_reporting', E_ALL); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload