Skip to content
Snippets Groups Projects

Change updateRecurAndTemplateContribution to take amount parameter directly

Merged mattwire requested to merge mattwire/upgraderecur:amountdirect into main
2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
271 275 *
272 276 * @return String HTML to add to activity details field.
273 277 */
274 public function updateRecurAndTemplateContribution(array $changeActivity, int $recurID) :string {
275
278 public function updateRecurAndTemplateContribution(int $recurID, float $newAmount) :string {
  • mattwire
    mattwire @mattwire started a thread on the diff
  • 256 256
    257 // As it succeeded, we can update the ContributionRecur
    258 $htmlLog = $this->updateRecurAndTemplateContribution($changeActivity, $recur['id']);
    259
    260 $htmlLog .= '<p> '. date('Y-m-d H:i:s ') . E::ts(
    257 if (empty($message)) {
    258 // The Payment Processor might not return any message if it was successful
    259 $message = 'OK';
    260 }
    261 $htmlLog = '<p> '. date('Y-m-d H:i:s ') . E::ts(
    261 262 "<p><strong>Successfully updated.</strong> Recurring contribution ID %1 was updated by the payment processor (changeSubscriptionAmount): %2</p>\n",
    262 263 [1 => $recur['id'], 2 => $message]
    263 264 );
    264 265
    266 // As it succeeded, we can update the ContributionRecur
    267 $htmlLog .= $this->updateRecurAndTemplateContribution($recur['id'], $newAmount);
    • Comment on lines +266 to +267
      Author Reporter

      Move this to after the "updated by payment processor" message since this is a separate "post" paymentprocessor step.

    • Please register or sign in to reply
  • Rich mentioned in commit 66e8661a

    mentioned in commit 66e8661a

  • merged

  • Please register or sign in to reply
    Loading