Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare support for cancelRecurring in manual processor #18804

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CRM/Core/Payment/Manual.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,18 @@ public function getText($context, $params) {
}
return ts('To complete your contribution, click the <strong>Continue</strong> button below.');

default:
return parent::getText($context, $params);
}
}

/**
* Does this processor support cancelling recurring contributions through code.
*
* @return bool
*/
protected function supportsCancelRecurring() {
return TRUE;
}

}
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Contribute/Page/TabTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testLinks() {

$templateVariable = CRM_Core_Smarty::singleton()->get_template_vars();
$this->assertEquals('Mr. Anthony Anderson II', $templateVariable['displayName']);
$this->assertEquals("<span><a href=\"/index.php?q=civicrm/contact/view/contributionrecur&amp;reset=1&amp;id=" . $recurID . "&amp;cid=" . $contactID . "&amp;context=contribution\" class=\"action-item crm-hover-button\" title='View Recurring Payment' >View</a><a href=\"/index.php?q=civicrm/contribute/updaterecur&amp;reset=1&amp;action=update&amp;crid=1&amp;cid=3&amp;context=contribution\" class=\"action-item crm-hover-button\" title='Edit Recurring Payment' >Edit</a><a href=\"#\" class=\"action-item crm-hover-button crm-enable-disable\" title='Cancel' >Cancel</a></span>",
$this->assertEquals("<span><a href=\"/index.php?q=civicrm/contact/view/contributionrecur&amp;reset=1&amp;id=" . $recurID . "&amp;cid=" . $contactID . "&amp;context=contribution\" class=\"action-item crm-hover-button\" title='View Recurring Payment' >View</a><a href=\"/index.php?q=civicrm/contribute/updaterecur&amp;reset=1&amp;action=update&amp;crid=1&amp;cid=3&amp;context=contribution\" class=\"action-item crm-hover-button\" title='Edit Recurring Payment' >Edit</a><a href=\"/index.php?q=civicrm/contribute/unsubscribe&amp;reset=1&amp;crid=" . $recurID . "&amp;cid=" . $contactID . "&amp;context=contribution\" class=\"action-item crm-hover-button\" title='Cancel' >Cancel</a></span>",
$templateVariable['activeRecurRows'][1]['action']
);
}
Expand Down