function _uc_stripe_get_customer_id in Ubercart Stripe 6.2
Same name and namespace in other branches
- 7.3 uc_stripe.module \_uc_stripe_get_customer_id()
- 7.2 uc_stripe.module \_uc_stripe_get_customer_id()
Retrieve the Stripe customer id for a user
Parameters
$uid:
Return value
bool
3 calls to _uc_stripe_get_customer_id()
- uc_stripe_charge in ./
uc_stripe.module - Generic "charge" callback that runs on checkout and via the order's "card" terminal
- uc_stripe_order_pane_stripe in ./
uc_stripe.module - Provide customer id for order pane.
- uc_stripe_renew in ./
uc_stripe.module - Handle renewing a recurring fee, called by uc_recurring
File
- ./
uc_stripe.module, line 602 - A stripe.js PCI-compliant payment gateway Forked from Bitcookie's work (thanks!) which was posted at http://bitcookie.com/blog/pci-compliant-ubercart-and-stripe-js from discussion in the uc_stripe issue queue, https://www.drupal.org/node/1467886
Code
function _uc_stripe_get_customer_id($uid) {
$account = user_load(array(
'uid' => $uid,
));
// For Drupal 7 stripe data will have to be stored somewhere better than data,
// which is gone in D7
if (empty($account->uc_stripe_customer_id)) {
return FALSE;
}
return $account->uc_stripe_customer_id;
}