function stripe_customer_stripe_customer_info in Stripe 7
Implements hook_stripe_customer().
This hook allows other modules to add additional data, such as business_vat_id or additional metadata to Stripe Customer creation and update calls.
File
- stripe_customer/
stripe_customer.module, line 326 - Provides integration with Stripe and Drupal Users as Customers.
Code
function stripe_customer_stripe_customer_info($account, $extra) {
// Always include our defaults.
$properties['email'] = $account->mail;
$properties['description'] = t('Customer for @mail', array(
'@mail' => $account->mail,
));
$properties['metadata'] = array(
'Member since' => format_date($account->created, 'short'),
'Username' => $account->name,
'User ID' => $account->uid,
);
// If we were passed extra parameters, add those last.
if (!empty($extra)) {
foreach ($extra as $param => $value) {
$properties[$param] = $value;
}
}
return $properties;
}