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

dev/financial#82 revert added setters #15707

Merged
merged 5 commits into from
Nov 4, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Re-apply useful cleanups from reverted commits
eileenmcnaughton committed Nov 4, 2019
commit abf0d662e33ac13475eb03e88e9349df0c21439d
4 changes: 1 addition & 3 deletions CRM/Core/Payment.php
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ abstract class CRM_Core_Payment {
RECURRING_PAYMENT_END = 'END';

/**
* @var object
* @var array
*/
protected $_paymentProcessor;

@@ -257,8 +257,6 @@ public function buildForm(&$form) {
* @todo move to factory class \Civi\Payment\System (or similar)
*
* @param array $params
*
* @return mixed
*/
public static function logPaymentNotification($params) {
$message = 'payment_notification ';
4 changes: 3 additions & 1 deletion api/v3/PaymentProcessor.php
Original file line number Diff line number Diff line change
@@ -124,8 +124,10 @@ function _civicrm_api3_payment_processor_getlist_defaults(&$request) {
* API result array.
*
* @throws \API_Exception
* @throws \CiviCRM_API3_Exception
*/
function civicrm_api3_payment_processor_pay($params) {
/* @var CRM_Core_Payment $processor */
$processor = Civi\Payment\System::singleton()->getById($params['payment_processor_id']);
$processor->setPaymentProcessor(civicrm_api3('PaymentProcessor', 'getsingle', ['id' => $params['payment_processor_id']]));
try {
@@ -149,7 +151,7 @@ function civicrm_api3_payment_processor_pay($params) {
*/
function _civicrm_api3_payment_processor_pay_spec(&$params) {
$params['payment_processor_id'] = [
'api.required' => 1,
'api.required' => TRUE,
'title' => ts('Payment processor'),
'type' => CRM_Utils_Type::T_INT,
];