From 14490e8398144edaf9bf32ebd208e7907bf2f8fa Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Sun, 19 Feb 2017 18:15:59 +0530 Subject: [PATCH] CRM-20058, added submit credit card payment link ---------------------------------------- * CRM-20058: Add Credit Card Payment link for partially paid contribution https://issues.civicrm.org/jira/browse/CRM-20058 --- CRM/Contribute/Selector/Search.php | 8 ++++++++ CRM/Event/Selector/Search.php | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/CRM/Contribute/Selector/Search.php b/CRM/Contribute/Selector/Search.php index 23181c272c..edbc66f565 100644 --- a/CRM/Contribute/Selector/Search.php +++ b/CRM/Contribute/Selector/Search.php @@ -448,6 +448,14 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C 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', diff --git a/CRM/Event/Selector/Search.php b/CRM/Event/Selector/Search.php index 0ed98c3dc5..eabe1342ab 100644 --- a/CRM/Event/Selector/Search.php +++ b/CRM/Event/Selector/Search.php @@ -370,6 +370,12 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co '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') { -- 2.25.1