/** * Make a "one off" charge on the customer for the given amount. * * @param int $amount * @param array $options * @return bool|mixed */ public function charge($amount, array $options = array()) { $options = array_merge(['currency' => 'usd'], $options); $options['amount'] = $amount; if (!array_key_exists('source', $options) && $this->billable->hasStripeId()) { $options['customer'] = $this->billable->getStripeId(); } if (!array_key_exists('source', $options) && !array_key_exists('customer', $options)) { throw new InvalidArgumentException("No payment source provided."); } try { $response = Stripe_Charge::create($options); } catch (Stripe_CardError $e) { return false; } return $response; }