This commit is contained in:
Cyprian Beauvois 2019-09-18 16:24:38 +02:00
parent f71c5da2c0
commit 199b45508d
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class BillingSrv
if (empty($customer->getStripeCustomerId()))
{
$customer = \Stripe\Customer::create(array(
$stripeCustomer = \Stripe\Customer::create(array(
"description" => "Customer for ".$customer->getUsername(),
"email" => $customer->getUsername(),
"metadata" => [
@ -48,7 +48,7 @@ class BillingSrv
]
));
$customerId = $customer["id"];
$customerId = $stripeCustomer["id"];
$customer->setStripeCustomerId($customerId);
$this->manager->persist($customer);
$this->manager->flush();