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-20252 Improve text when processing possibly-delayed-payments #9971

Merged
merged 1 commit into from
Mar 18, 2017

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Mar 13, 2017

@eileenmcnaughton
Copy link
Contributor Author

test this please

@@ -284,6 +283,28 @@ public function buildQuickForm() {
$this->assign('friendURL', $url);
}

$isPendingOutcome = TRUE;
Copy link
Contributor

Choose a reason for hiding this comment

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

@eileenmcnaughton should this be FALSE as the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps it should default to !is_pay_later - ie if we are dealing with pay later then by default FALSE, otherwise TRUE & then we check

Copy link
Contributor

Choose a reason for hiding this comment

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

That could make sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just tested & it is fine for pay later. So, for non-paylater it should reflect the outcome. I think it's safer if any doubt to give the 'we don't know yet' message

'invoice_id' => CRM_Utils_Array::value('invoiceID', $params),
));
if (CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contributionStatusID) === 'Pending'
&& !empty($params['payment_processor_id'])
Copy link
Contributor

Choose a reason for hiding this comment

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

@eileenmcnaughton is this to exclude pay later options?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, currently false is kinda the default & then if there is a payment processor & it is pending then we change to pending. I just double checked & the text is fine when pay later is in use

$contributionStatusID = civicrm_api3('Contribution', 'getvalue', array(
'id' => CRM_Utils_Array::value('contributionID', $params),
'return' => 'contribution_status_id',
'invoice_id' => CRM_Utils_Array::value('invoiceID', $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 is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah - the point is the ipn could have updated the status - so looking to find out what it actually is

Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't that be able to be found through just the ID, i'm just wondering why the invoice_id is needed specifically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could usefully also react to failure here.... but as a follow up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah invoice id - because when I deployed it I found sometimes on the IPN return we have contribution id but not invoice id

Copy link
Contributor

@seamuslee001 seamuslee001 left a comment

Choose a reason for hiding this comment

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

I think this looks sane to me only question is over the default setting

@eileenmcnaughton
Copy link
Contributor Author

Did you see my comment on the default? Basically it tested fine on pay later & I think it's a better default if there is any doubt

@seamuslee001
Copy link
Contributor

Happy following the testing

@eileenmcnaughton eileenmcnaughton merged commit 63103e1 into civicrm:master Mar 18, 2017
@eileenmcnaughton eileenmcnaughton deleted the delayed_recur branch March 18, 2017 03:20
monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
CRM-20252 Improve text when processing possibly-delayed-payments
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