This commit removed some function calls to "vodaplex" functions that did not exist. However, the variable $periods_past_due remained:
//check if periods to charge
if($periods_past_due > 0){
$amount = $fee->fee_amount * $periods_past_due;
$data['txn_type'] = UC_CREDIT_AUTH_CAPTURE;
uc_recurring_fee_user_save($fee);
}
This chunk of code does nothing since $periods_past_due is not declared before this reference (even if it were, $amount and $data are never referenced again outside of this clause, and $fee is pointlessly being saved without having been modified). The same issue applies to both 7.x-2.x and 6.x-2.x branches.
The attached patches (d7 and d6) remove this chunk altogether.
Finally, a point to consider:
Not all installations want to re-charge missed payments. If a payment gets missed because of a technical issue (or for whatever reason really), it will be especially disconcerting to the user to be double-billed the following month... or worse triple-billed the month after that... etc.
If this functionality gets implemented properly, there should be a configuration option for "compounding chargebacks", and it should be defaulted to false since it doesn't currently exist (ie. it's a new feature and should not change current behavior).
| Comment | File | Size | Author |
|---|---|---|---|
| Drupal 7 - uc_recurring-remove_nonexistent_variable-7.x.patch | 819 bytes | aaronbauman | |
| Drupal 6 - uc_recurring-remove_nonexistent_variable-6.x.patch | 880 bytes | aaronbauman |
Comments
Comment #1
SeanA commentedPatches both apply cleanly and remove vestigial codechunks.
Comment #2
univate commentedcommitted to both branches.
Comment #3.0
(not verified) commentedclarifications