Answers.Body: <p>Purportedly resolved in an update pushed by CiviCRM Admin Utilities 0.8 released on 20 November 2020 (<a href="https://lab.civicrm.org/dev/core/-/issues/1931" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/1931</a>). Payments have been closing for us fine since applying the patch - until today :-. We've had two transactions that wrote the incorrect IPN return URL and two right next to them that wrote the correct IPN return. Going to hit up the lab thread and see if others have run into this problem.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T12:55:53.577Z
Answers.Text: Can you check your access logs for the *exact* URL that PayPal is using?
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-05T15:59:56.167Z
Answers.Text: The failing transactions (404) are trying to connect to:
  https://--.org/wp/user-dashboard/?civiwp=CiviCRM&q=civicrm/payment/ipn/3
  The transactions that close properly have the correct IPN return URLs:
  https://--.org/wp/civicrm/payment/ipn/3/. I confirmed the configuration of the IPN return URL in PayPal and reset it, just in case :-)
Answers.UserDisplayName: Geof Newton
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-31T16:56:19.947Z
Answers.LastActivityDate: 2020-12-31T16:56:19.947Z
Answers.UserDisplayName: Geof Newton
Body: <p>End of year and we are getting membership renewals. We've used PayPal for years no problem, but since Dec 1, the IPNs (instant purchase notifications) are not working correctly. The transactions are left in the 'Pending' state. I've gone into PayPal's IPN history page and manually resent a few IPNs and they they go through and are then marked as 'Completed' in CiviCRM. But due to bugs in the PayPal history page I can only resend for payments for the last few days. Why are they not going through the first time? This just started happening this month.</p>
  <p>I found the patch line:</p>
  <blockquote>
  <p>$paypalParams['notify_url'] = rawurldecode($paypalParams['notify_url']);</p>
  </blockquote>
  <p>and added it to the CRM/Core/Payment/PayPalImpl.php file (I have a different file version from the github entry but found the spot anyway.) Then I made a contribution and the IPN worked, transaction marked as Completed in CiviCRM. Unfortunately there was an error someplace when returning to our site from PayPal's 'return to merchant' link.</p>
  <p>Error:</p>
  <blockquote>
  <p>We can't load the requested web page. This page requires cookies to be
  enabled in your browser settings. Please check this setting and enable
  cookies (if they are not enabled). Then try again. If this error
  persists, contact the site administrator for assistance.<br /><br
  />Site Administrators: This error may indicate that users are
  accessing this page using a domain or URL other than the configured
  Base URL. EXAMPLE: Base URL is <a href="http://example.org" rel="nofollow noreferrer">http://example.org</a>, but some users are
  accessing the page via <a href="http://www.example.org" rel="nofollow noreferrer">http://www.example.org</a> or a domain alias like
  <a href="http://myotherexample.org" rel="nofollow noreferrer">http://myotherexample.org</a>.<br /><br />Error type: Could not find a
  valid session key.</p>
  </blockquote>
  <p>This is as far as I have gotten with this.</p>
  <p>CiviCRM: 5.29.1
  Wordpress: 5.5.3</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-23T22:31:52.793Z
Comments.Text: Looks like the error on return from paypal is due to being logged into wordpress as admin at the same time.
Comments.UserDisplayName: P a u l
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-23T22:35:59.047Z
Comments.Text: We have the same issue on a site at present and are digging our way through it. Various threads/Jira issues are running on this but the closest seems to be this one. https://lab.civicrm.org/dev/core/-/issues/1931. I'll post back depending on our findings but likely to be in the new year now.
Comments.UserDisplayName: Parvez Saleh
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-24T01:05:00.313Z
Comments.Text: Yes that's the link I found and the patch line they discuss worked for me. Helps to be a programmer to have confidence in adding it by hand.
Comments.UserDisplayName: P a u l
Tags: <civicontribute><paypal>
Title: Problem with PayPal IPNs not going through
ThreadText: # Problem with PayPal IPNs not going through
  
  (Asked by: username_0 on 2020-12-23)
  
  End of year and we are getting membership renewals. We've used PayPal for years no problem, but since Dec 1, the IPNs (instant purchase notifications) are not working correctly. The transactions are left in the 'Pending' state. I've gone into PayPal's IPN history page and manually resent a few IPNs and they they go through and are then marked as 'Completed' in CiviCRM. But due to bugs in the PayPal history page I can only resend for payments for the last few days. Why are they not going through the first time? This just started happening this month.
  
  I found the patch line:
  
  > $paypalParams['notify\_url'] = rawurldecode($paypalParams['notify\_url']);
  
  and added it to the CRM/Core/Payment/PayPalImpl.php file (I have a different file version from the github entry but found the spot anyway.) Then I made a contribution and the IPN worked, transaction marked as Completed in CiviCRM. Unfortunately there was an error someplace when returning to our site from PayPal's 'return to merchant' link.
  
  Error:
  
  > We can't load the requested web page. This page requires cookies to be
  > enabled in your browser settings. Please check this setting and enable
  > cookies (if they are not enabled). Then try again. If this error
  > persists, contact the site administrator for assistance.  
  >   
  > Site Administrators: This error may indicate that users are
  > accessing this page using a domain or URL other than the configured
  > Base URL. EXAMPLE: Base URL is <http://example.org>, but some users are
  > accessing the page via <http://www.example.org> or a domain alias like
  > <http://myotherexample.org>.  
  >   
  > Error type: Could not find a
  > valid session key.
  
  This is as far as I have gotten with this.
  
  CiviCRM: 5.29.1
  Wordpress: 5.5.3
  
  **Tags:** civicontribute, paypal
  
  > **Comments:**
  > **username_0**: Looks like the error on return from paypal is due to being logged into wordpress as admin at the same time.  
  > **username_1**: We have the same issue on a site at present and are digging our way through it. Various threads/Jira issues are running on this but the closest seems to be this one. https://lab.civicrm.org/dev/core/-/issues/1931. I'll post back depending on our findings but likely to be in the new year now.  
  > **username_0**: Yes that's the link I found and the patch line they discuss worked for me. Helps to be a programmer to have confidence in adding it by hand.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-12-31. Score: 1
  
  Purportedly resolved in an update pushed by CiviCRM Admin Utilities 0.8 released on 20 November 2020 (<https://lab.civicrm.org/dev/core/-/issues/1931>). Payments have been closing for us fine since applying the patch - until today :-. We've had two transactions that wrote the incorrect IPN return URL and two right next to them that wrote the correct IPN return. Going to hit up the lab thread and see if others have run into this problem.
  
  > **Comments:**
  > **username_3**: Can you check your access logs for the *exact* URL that PayPal is using?  
  > **username_2**: The failing transactions (404) are trying to connect to: https://--.org/wp/user-dashboard/?civiwp=CiviCRM&q=civicrm/payment/ipn/3 The transactions that close properly have the correct IPN return URLs: https://--.org/wp/civicrm/payment/ipn/3/. I confirmed the configuration of the IPN return URL in PayPal and reset it, just in case :-)  
  
  ---
  
  