You are here

function stripe_get_customer in Stripe 7

Get a Customer object from Stripe based on a customer_id.

Parameters

string $customer_id: Known Stripe Customer ID value.

Return value

\Stripe\Customer|bool Customer object if successful, FALSE otherwise

2 calls to stripe_get_customer()
stripe_customer_customer_view_form in stripe_customer/stripe_customer.admin.inc
Menu callback for Admin View Customer form.
stripe_customer_from_webhook in stripe_customer/stripe_customer.module
Retrieve a Stripe Customer from a webhook event.

File

stripe_customer/stripe_customer.module, line 71
Provides integration with Stripe and Drupal Users as Customers.

Code

function stripe_get_customer($customer_id) {
  $customer = _stripe_customer_retrieve($customer_id);
  if ($customer instanceof \Stripe\Customer) {
    return $customer;
  }
  else {
    return FALSE;
  }
}