public function toArray() { $this->__load(); return parent::toArray(); }
public function chargeCustomer(Customer $customer, $amount, $statement = null, $description = null) { $charge = new Charge($customer); $sc = \Stripe\Charge::create(['amount' => $amount, 'currency' => 'usd', 'customer' => $customer->getStripeId(), 'statement_descriptor' => $statement, 'description' => $description]); $charge->updateStripeData($sc); $this->em->persist($charge); $this->em->flush($charge); return $charge; }