title: How to Charge Multiple Items at once in Stripe?
body: <p>I'm trying to find a way to get Stripe to charge multiple items in one charge. I'm thinking it would look something like this:</p>
  
  <pre><code>$totalitems = [];
  if ( $item1 == "true" ) {
      $currentitem = array(
      "amount" =&gt; 19999,
      "currency" =&gt; "usd",
      "description" =&gt; "Item 1",
      "customer" =&gt; $customer-&gt;id,
      );
      array_push($totalitems, $currentitem);
  }
  
  if ( $item2 == "true" ) {
      $currentitem = array(
      "amount" =&gt; 29999,
      "currency" =&gt; "usd",
      "description" =&gt; "Item 2",
      "customer" =&gt; $customer-&gt;id,
      );
      array_push($totalitems, $currentitem);
  }
  
  $charge = \Stripe\Charge::create([$totalitems]);
  </code></pre>
  
  <p>this only charges the first item in the array. Is there a way to charge multiple items at once?</p>