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).

Comments

SeanA’s picture

Status: Needs review » Reviewed & tested by the community

Patches both apply cleanly and remove vestigial codechunks.

univate’s picture

Status: Reviewed & tested by the community » Fixed

committed to both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

clarifications