/**
  * Get the Stripe customer for entity.
  *
  * @return \Stripe_Customer
  */
 public function getStripeCustomer($id = null)
 {
     $customer = Customer::retrieve($id ?: $this->billable->getStripeId(), $this->getStripeKey());
     if ($this->usingMultipleSubscriptionApi($customer)) {
         $customer->subscription = $customer->findSubscription($this->billable->getStripeSubscription());
     }
     return $customer;
 }
Exemple #2
0
 /**
  * Get the Gateway customer for entity.
  *
  * @return \Gateway\Customer
  */
 public function getGatewayCustomer($id = null)
 {
     $customer = Customer::retrieve($id ?: $this->billable->getGatewayId(), $this->getGatewayKey());
     if (!isset($customer->deleted) && $this->usingMultipleSubscriptionApi($customer)) {
         $customer->subscription = $customer->findSubscription($this->billable->getGatewaySubscription());
     }
     return $customer;
 }