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

CRM-20058, added submit credit card payment link #9860

Merged
merged 2 commits into from
Mar 10, 2017
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
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');
}
elseif (CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()) {
$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
8 changes: 8 additions & 0 deletions CRM/Event/Selector/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,14 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=event',
'title' => ts('Record Payment'),
);
if (CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()) {
$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