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

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

We added some structure to CRM_Core_Payment in the current unreleased code. However @artfulrobot has a proposal that @mattwire & I both agree is better architecture and less likely to break stuff.

I think the cleanest option here is to simply reverse these changes in 5.20 and do them again, better. I'd like the better to be in 5.20 but if we missed 5.20 I think it would not cause issues

Before

New but now deprecated methods in play

After

Slate cleaned to try again

Technical Details

@mattwire @artfulrobot

Comments

@civibot
Copy link

civibot bot commented Nov 2, 2019

(Standard links)

@civibot civibot bot added the master label Nov 2, 2019
@eileenmcnaughton
Copy link
Contributor Author

@mattwire @artfulrobot - so merging this is priority 1 in my opinion - then we can finalised @artfulrobot's improved version - but we should get this merged before the rc is cut

Copy link
Contributor

@mattwire mattwire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton I think there's a few bits in here (mostly comments) that should not be.

@@ -150,7 +139,7 @@ function civicrm_api3_payment_processor_pay($params) {
}
throw new API_Exception('Payment failed', $code, $errorData, $e);
}
return civicrm_api3_create_success([$result], $params);
return civicrm_api3_create_success(array($result), $params);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton This shouldn't be in here

@@ -160,7 +149,7 @@ function civicrm_api3_payment_processor_pay($params) {
*/
function _civicrm_api3_payment_processor_pay_spec(&$params) {
$params['payment_processor_id'] = [
'api.required' => TRUE,
'api.required' => 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton This shouldn't be in here

@@ -154,8 +143,6 @@ public function testPaymentProcessorDelete() {

/**
* Check with valid params array.
*
* @throws \CRM_Core_Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton None of this needs to go?

Comment on lines 127 to 130
* @throws \CiviCRM_API3_Exception
*/
function civicrm_api3_payment_processor_pay($params) {
/* @var CRM_Core_Payment $processor */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton Don't need to remove?

@@ -632,6 +257,8 @@ public function buildForm(&$form) {
* @todo move to factory class \Civi\Payment\System (or similar)
*
* @param array $params
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton This doesn't need removing

* @var array
* @var object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton Don't think this should be in here

These are all new in 5.20 & if we are going to change we should reverse & re-do before cutting 5.20
…tProcessor.pay, pass incoieID"

This reverts commit 783b62a.
@eileenmcnaughton
Copy link
Contributor Author

@mattwire I've re-applied some of those changes in an extra commit - I think most of them are easy enough to re-spot / re-do

@mattwire mattwire merged commit 805b654 into civicrm:master Nov 4, 2019
@seamuslee001 seamuslee001 deleted the setter branch November 4, 2019 23:27
@eileenmcnaughton
Copy link
Contributor Author

Thanks @mattwire - @artfulrobot - where are we at with your alternative - it's still marked WIP but I think you possibly think it is review-ready

@artfulrobot
Copy link
Contributor

@eileenmcnaughton yes, I'll discuss that at #15697 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants