title: Why Stripe API is not working on live website?
body: <p>I'm trying to use Stripe to handle some payments on a little website.</p>
  
  <p>In local, everything works great : all my tests are good.
  The problem is in live website : I can get a token (from javascript) but the <code>\Stripe\Charge::create</code> in the php side is buggy and I can't figure out why.</p>
  
  <p>Here's some infos :</p>
  
  <pre><code># Making Stripe works
  require_once(dirname(__FILE__).'/stripe/init.php');
  
  # Set API Key (Both Live and Test keys don't work)
  \Stripe\Stripe::setApiKey("sk_test_****");
  
  # Trying to charge
  # $token is defined from the $_POST and works great ($amount and $metas are fine too)
  
  try {
      $charge = \Stripe\Charge::create(
          array(
              'amount' =&gt; $amount,
              'currency' =&gt; 'eur',
              'source' =&gt; $token,
              'metadata' =&gt; $metas
          )
      );
  
      // Blabla
  } catch(\Stripe\Error\Card $e) {
      // Catching card error
  } catch (\Stripe\Error\RateLimit $e) {
      // Catching RateLimit API error
  } catch (\Stripe\Error\InvalidRequest $e) {
      // Catching invalid request (missing param or else)
  } catch (\Stripe\Error\Authentication $e) {
      // Catching fail authentification from API KEY for example
  } catch (\Stripe\Error\ApiConnection $e) {
      // Catching fail APIConnection
      // The error seems related to this because the catch is done here !
  } catch (\Stripe\Error\Base $e) {
      // Catching base error
  } catch (Exception $e) {
      // Catching other errors
  }
  </code></pre>
  
  <p>On local it works great, but on live server it catches an error (after a while) on the <code>\Stripe\Error\ApiConnection</code> with no real informations.</p>
  
  <pre><code>#$e contains :
  "httpStatus":null,
  "httpBody":null,
  "jsonBody":null,
  "httpHeaders":null,
  "requestId":null,
  "stripeCode":null
  </code></pre>
  
  <p>Which is not a very good sign.</p>
  
  <p>Except for the gettin' token part (which works great) I have nothing in my Stripe's Dashboard's Logs about this Charge Trial. It looks like Stripe never receive the request.</p>
  
  <p>I tryied to ping <code>api.stripe.com</code> from my server, it works great.</p>
  
  <p>Code on local and live sites are the same, stripe keys are well copy/pasted (it works on local, so...).</p>
  
  <p>My Stripe's account is validate so I can use Live Keys (but both live and test keys are not working like I said).</p>
  
  <p>API is up-to-date.</p>
  
  <p>I don't know where else to search : I contacted the Stripe's support and I'm still waiting for an answer.</p>
  
  <p>Thx for your interest...</p>