Skip to content

Commit

Permalink
CRM-20058, added submit credit card payment link
Browse files Browse the repository at this point in the history
----------------------------------------
* CRM-20058: Add Credit Card Payment link for partially paid contribution
  https://issues.civicrm.org/jira/browse/CRM-20058
  • Loading branch information
pradpnayak committed Feb 19, 2017
1 parent cd8eca8 commit 14490e8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CRM/Contribute/Selector/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
if ($row['contribution_status_name'] == 'Pending refund') {
$buttonName = ts('Record Refund');
}
else {
$links[CRM_Core_Action::BASIC] = array(
'name' => ts('Submit Credit Card payment'),
'url' => 'civicrm/payment/add',
'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=contribution&mode=live',
'title' => ts('Submit Credit Card payment'),
);
}
$links[CRM_Core_Action::ADD] = array(
'name' => $buttonName,
'url' => 'civicrm/payment',
Expand Down
6 changes: 6 additions & 0 deletions CRM/Event/Selector/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=event',
'title' => ts('Record Payment'),
);
$links[CRM_Core_Action::BASIC] = array(
'name' => ts('Submit Credit Card payment'),
'url' => 'civicrm/payment/add',
'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=event&mode=live',
'title' => ts('Submit Credit Card payment'),
);
}

if ($statusTypes[$row['participant_status_id']] == 'Pending refund') {
Expand Down

0 comments on commit 14490e8

Please sign in to comment.