Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Duplicate
-
Affects Version/s: 4.7.15
-
Fix Version/s: None
-
Component/s: CiviContribute
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
Description
In what appears to be a regression from CRM-18027, the link to update a subscription is not
being included in an online receipt.
The receipt code includes this if statement:
{if $is_recur and ($contributeMode eq 'notify' or $contributeMode eq 'directIPN')}
It only includes the update subscription link if this condition is met.
Prior to the change made in CRM-18027, contributeMode was always set to notify so it always was triggered.
However, CRM-18027 added the following to CRM/Contribute/BAO/Contribution.php:
+ // For some unit tests contribution cannot contain paymentProcessor information + $billingMode = empty($this->_relatedObjects['paymentProcessor']) ? CRM_Core_Payment::BILLING_MODE_NOTIFY : $this->_relatedObjects['paymentProcessor']['billing_mode']; + $template->assign('contributeMode', CRM_Utils_Array::value($billingMode, CRM_Core_SelectValues::contributeMode()));
Now, contributeMode is set to whatever billing_mode is set to by the payment processor. In the case of authorize.net, it is set to: 1
In Core_Payment we have
Core_Payment::BILLING_FORM = 1
Which according to the comments indicates that we collect the credit card on the civi page, which seems correct.
And Core_SelectValues::contributeMode assigns the key BILLING_MODE_FORM to "direct".
So... the template now gets "direct" instead of "notify" and therefore never displays the block.