Skip to content

Commit

Permalink
Release merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed Feb 5, 2025
2 parents 53898d1 + 466fe7a commit aeb1bac
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions CRM/Contribute/Page/ContributionRecur.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,24 +201,24 @@ function view() {
$contributionId = CRM_Core_DAO::singleValueQuery($sql, $params);
$paymentClass = CRM_Contribute_BAO_Contribution::getPaymentClass($contributionId);

if ((method_exists($paymentClass, 'doRecurTransact') || method_exists($paymentClass, 'doRecurUpdate')) && CRM_Core_Permission::check('edit contributions')) {
$controllerTransact = new CRM_Core_Controller_Simple('CRM_Contribute_Form_MakingTransaction', NULL, CRM_Core_Action::NONE);
$controllerTransact->setEmbedded(TRUE);
$controllerTransact->set('recurId', $recur->id);
$controllerTransact->set('contributionId', $contributionId);
$controllerTransact->set('contactId', $recur->contact_id);
$controllerTransact->process();
$controllerTransact->run();
}

if (method_exists($paymentClass, 'getRecordDetail')) {
$recordDetail = $paymentClass::getRecordDetail($contributionId);
$this->assign('record_detail', $recordDetail);
}

// Get payment processor
if (!empty($paymentClass) && !empty($paymentClass::$_hideFields)) {
$this->assign('hide_fields', $paymentClass::$_hideFields);
if (is_object($paymentClass)) {
if ((method_exists($paymentClass, 'doRecurTransact') || method_exists($paymentClass, 'doRecurUpdate')) && CRM_Core_Permission::check('edit contributions')) {
$controllerTransact = new CRM_Core_Controller_Simple('CRM_Contribute_Form_MakingTransaction', NULL, CRM_Core_Action::NONE);
$controllerTransact->setEmbedded(TRUE);
$controllerTransact->set('recurId', $recur->id);
$controllerTransact->set('contributionId', $contributionId);
$controllerTransact->set('contactId', $recur->contact_id);
$controllerTransact->process();
$controllerTransact->run();
}
if (method_exists($paymentClass, 'getRecordDetail')) {
$recordDetail = $paymentClass::getRecordDetail($contributionId);
$this->assign('record_detail', $recordDetail);
}
// Get payment processor
if (!empty($paymentClass) && !empty($paymentClass::$_hideFields)) {
$this->assign('hide_fields', $paymentClass::$_hideFields);
}
}

// show 'edit' button depends on permission.
Expand Down

0 comments on commit aeb1bac

Please sign in to comment.