}
$actionLinks = [];
$actionLinks[] = [
- 'url' => CRM_Utils_System::url('civicrm/payment', [
- 'action' => 'add',
- 'reset' => 1,
- 'id' => $id,
- 'is_refund' => 0,
- ]),
+ 'url' => 'civicrm/payment',
'title' => ts('Record Payment'),
'accessKey' => '',
'ref' => '',
'name' => '',
- 'qs' => '',
+ 'qs' => [
+ 'action' => 'add',
+ 'reset' => 1,
+ 'id' => $id,
+ 'is_refund' => 0,
+ ],
'extra' => '',
];
if (CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()) {
$actionLinks[] = [
- 'url' => CRM_Utils_System::url('civicrm/payment', [
+ 'url' => 'civicrm/payment',
+ 'title' => ts('Submit Credit Card payment'),
+ 'accessKey' => '',
+ 'ref' => '',
+ 'name' => '',
+ 'qs' => [
'action' => 'add',
'reset' => 1,
'is_refund' => 0,
'id' => $id,
'mode' => 'live',
- ]),
- 'title' => ts('Submit Credit Card payment'),
- 'accessKey' => '',
- 'ref' => '',
- 'name' => '',
- 'qs' => '',
+ ],
'extra' => '',
];
}
if ($contributionStatus !== 'Pending') {
$actionLinks[] = [
- 'url' => CRM_Utils_System::url('civicrm/payment', [
- 'action' => 'add',
- 'reset' => 1,
- 'id' => $id,
- 'is_refund' => 1,
- ]),
+ 'url' => 'civicrm/payment',
'title' => ts('Record Refund'),
'accessKey' => '',
'ref' => '',
'name' => '',
- 'qs' => '',
+ 'qs' => [
+ 'action' => 'add',
+ 'reset' => 1,
+ 'id' => $id,
+ 'is_refund' => 1,
+ ],
'extra' => '',
];
}
$paymentInfo = CRM_Contribute_BAO_Contribution::getPaymentInfo($id, 'contribution', TRUE);
$title = ts('View Payment');
$this->assign('transaction', TRUE);
+ // Used in paymentInfoBlock.tpl
$this->assign('payments', $paymentInfo['transaction']);
$this->assign('paymentLinks', $paymentInfo['payment_links']);
return $title;
{/if}
{foreach from=$paymentLinks item=paymentLink}
- <a class="open-inline action-item crm-hover-button" href="{$paymentLink.url}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}{$paymentLink.title}{/ts}</a>
+ <a class="open-inline action-item crm-hover-button" href="{crmURL p=$paymentLink.url q=$paymentLink.qs}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}{$paymentLink.title}{/ts}</a>
{/foreach}
{/crmRegion}