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-20164 Fix IPN notify URL with Joomla when derived from menu item #11236

Merged
merged 1 commit into from
Nov 4, 2017

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Nov 3, 2017

Overview

In Joomla, menu items have an &Itemid=## param appended to URLs. If a contribution page is created as a menu item, all CiviCRM paths then have this value appended, and that value is carried through to any other URL constructions, including the notify_url passed to PayPal. It seems that the presence of that param throws off the IPN processing – I suspect that an Itemid lookup occurs to get the original menu parameters, which then override notify_url.

Before

Paypal IPN doesn't work when contribution page used via a Joomla menu item

After

Paypal IPN works when contribution page used via a Joomla menu item

@lcdservices Could you verify/review this please?

@mattwire
Copy link
Contributor Author

mattwire commented Nov 3, 2017

Jenkins test this please

@lcdservices
Copy link
Contributor

Tested and confirmed.

Without this patch, using PayPal Standard in a contribution page:

  • standalone Civi url (not via menu item): payment was processed and updated to completed status properly
  • Joomla menu item url: payment was processed but contribution was left in pending status

With this patch the Joomla menu item url processed the contribution and correctly updated the contribution status.

I also reviewed the IPN history logs and confirmed that with this patch the only difference in the callback URLs is the absence of the Itemid. I feel confident your assessment of the issue is correct.

One last comment --
I think this is a recent regression due to the restructuring of the IPN callback URLs. Previously the callback URL pointed to the appropriate script in the extern folder. It seems that was recently changed to make use of standard Civ-constructed URLs. There may be other cases impacted by that change that we need to look out for.

@colemanw
Copy link
Member

colemanw commented Nov 4, 2017

I'll merge this but it doesn't seem like a very robust fix. Seems like a system of exclusions is needed.

@colemanw colemanw merged commit 1d68527 into civicrm:master Nov 4, 2017
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-20164 Fix IPN notify URL with Joomla when derived from menu item
@mattwire mattwire deleted the CRM-20164_Joomla_IPN branch January 17, 2018 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants