function uc_recurring_fee_user_save in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 uc_recurring.module \uc_recurring_fee_user_save()
Saves a recurring fee for a user.
Parameters
$fee: A fee object.
Return value
The reccuring fee ID of the saved fee.
10 calls to uc_recurring_fee_user_save()
- uc_recurring_expire in ./
uc_recurring.module - Process a fee expiration.
- uc_recurring_extend_fee in ./
uc_recurring.module - Handle extensions when a recurring payment was unsuccessful.
- uc_recurring_fee_cancel in ./
uc_recurring.module - Wrapper function to cancel a user's recurring fee.
- uc_recurring_hosted_authorizenet_arb_process in modules/
uc_recurring_hosted/ uc_recurring_hosted.module - Set up the recurring fee using the ARB API.
- uc_recurring_hosted_paypal_wpp_process in modules/
uc_recurring_hosted/ uc_recurring_hosted.module - PayPal website payments pro process.
1 string reference to 'uc_recurring_fee_user_save'
- uc_recurring_ca_entity in ./
uc_recurring.ca.inc - Implementation of hook_ca_entity().
File
- ./
uc_recurring.module, line 778 - Allows you to add a recurring fee to a product/SKU to handle subscription type services.
Code
function uc_recurring_fee_user_save($fee) {
// Update an existing row.
drupal_alter('recurring_fee_user_save', $fee);
if (!empty($fee->rfid)) {
// Update an existing row.
drupal_write_record('uc_recurring_users', $fee, array(
'rfid',
));
}
else {
drupal_write_record('uc_recurring_users', $fee);
}
// Allow modules to do things with the full object (always with rfid).
module_invoke_all('recurring_fee_user_saved', $fee);
return $fee->rfid;
}