/** * 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; }