function StripeGateway::getStripeCustomerID in Ubercart Stripe 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Ubercart/PaymentMethod/StripeGateway.php \Drupal\uc_stripe\Plugin\Ubercart\PaymentMethod\StripeGateway::getStripeCustomerID()
Retrieve the Stripe customer id for a user
Parameters
$uid:
Return value
string|NULL
1 call to StripeGateway::getStripeCustomerID()
- StripeGateway::chargeCard in src/Plugin/ Ubercart/ PaymentMethod/ StripeGateway.php 
- Called when a credit card should be processed.
File
- src/Plugin/ Ubercart/ PaymentMethod/ StripeGateway.php, line 392 
Class
- StripeGateway
- Stripe Ubercart gateway payment method.
Namespace
Drupal\uc_stripe\Plugin\Ubercart\PaymentMethodCode
function getStripeCustomerID($uid) {
  /** @var \Drupal\user\UserDataInterface $userdata_container */
  $userdata_container = \Drupal::getContainer('user.data');
  $id = $userdata_container
    ->get('uc_stripe', $uid, 'uc_stripe_customer_id');
  return $id;
}