CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Auto renew memberships pending with PayPal Pro
Pages: [1]

Author Topic: Auto renew memberships pending with PayPal Pro  (Read 3205 times)

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Auto renew memberships pending with PayPal Pro
January 04, 2013, 08:35:06 pm
Hi all, I've set up some new membership types for our nonprofit and they all have auto renew required. I've been testing them with the 'test-drive' pages just like I do for any contribution page I make (usually events). The transaction goes through from the users perspective but in the back end, it just sits there as pending and no confirmation/receipt email gets sent.  Civi gives this message to the user:

Your contribution has been submitted to PayPal Pro for processing. Please print this page for your records.
An email receipt will be sent to 1234@567890.com once the transaction is processed successfully.


I tested these yesterday evening and waited 24 hours in case PayPal just took a while, but nothing has happened still. As far as I understand it, the transaction gets sent to PP, PP processes it then talks back to Civi which completes it. That would happen for each instance of auto renewal as well. I've turned on IPN as per the documentation and all other non auto renew transactions work just fine.

I have not tested this live yet, so I'm wondering if it's not working because it just won't in test-drive mode. Does anyone know if that is the case? I figured I would ask before I start testing live. Thanks for anything thoughts and help!

« Last Edit: January 04, 2013, 08:37:21 pm by CityClub »
CityClub

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto renew memberships pending with PayPal Pro
January 04, 2013, 08:51:19 pm

check your paypal sandbox console and see if its recorded there

also try resending the IPN manually and see if that does the right thing in civicrm

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 04, 2013, 09:00:24 pm
Edit: Took me a little bit but I got finally got into the sandbox test site and I do see all the tests I did the other night in both the history and recurring payments and when I checked, IPN wasn't even turned on for the test account. I'm guessing that's why it's not working and they're just pending. I'm going turn IPN on for the test account and try again. Will update soon. Thanks.
« Last Edit: January 04, 2013, 09:29:21 pm by CityClub »
CityClub

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 04, 2013, 11:44:33 pm
Okay so I turned on IPN for our sandbox account and retried a test-drive auto renewal membership. It showed up in history, a recurring payment profile was created, the money was received and according to the IPN history page the IPN message was sent successfully. The test membership that was created is still just pending though.

So it seems that Civi isn't set to receive it properly perhaps? When enabling the IPN functionality, I used our base URL for the Notification URL and set everything up per http://wiki.civicrm.org/confluence/display/CRMDOC42/PayPal+Website+Payments+Standard+and+Recurring+Contributions and it's still just pending. I resent the IPN message manually but that didn't work either.

I also checked CiviCRM.log as mentioned in the link above, but the latest entry is from Sept 2010, so that didn't seem helpful. I looked in both places mentioned and only found one log. Is there another place it might be?

Thanks.
CityClub

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto renew memberships pending with PayPal Pro
January 06, 2013, 09:16:13 am

can u resend the IPN manually and see how the web server responds? check your apache logs and see if the IPN is recorded there

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 06, 2013, 11:24:56 am
Yeah I have resent the IPN manually and PayPal of course says it went through fine. Where would the apache log be? I haven't found it.
CityClub

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 06, 2013, 04:44:27 pm
So I don't have SSH access and don't see any var folder for an apache log. I did find the logs folder at the root and it does have www logs but there's not anything that I can see that corresponds to a PayPal IPN message.
CityClub

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto renew memberships pending with PayPal Pro
January 07, 2013, 08:04:57 am

I would debug that first and figure out why the paypal ipn is not registering in your apache logs

checking the url paypal is sending it to might be a good first step

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 07, 2013, 08:58:47 am
Would that be the notification URL? I used just our main page like the documentation says. I looked at our live IPN history and found a recent transaction that went through and is completed and then looked for anything related to it in the www-log.gz for that day and there was nothing so it seems pretty sure that PayPal IPN just isn't really getting back to Civi.

A few notes:
  • IPN had never been turned on (live or sandbox) until just recently when I started trying to get the auto-renew memberships working. Live payments, including recurring in the past worked fine, and there seems to be no interruptions (though we don't offer recurring anymore).
  • This was all with a real credit card test-driving the page and paying on the actual page.
  • When I just tried clicking on the PayPal button and paying with a test PayPal account, it gave this error: Payment Processor Error message: 11502: Invalid Token The token is invalid and wouldn't even go through.

Do I need to create a listener on our side somewhere to get the IPN messages to be actually received?

I'm still quite the novice with both PayPal and Civi so I apologize for being out of the loop on some things and appreciate the help found in the community!
CityClub

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 07, 2013, 01:45:17 pm
Okay after digging around some more I found:

173.0.82.126 - - [07/Jan/2013:13:18:14 -0500] "POST /sites/all/modules/extern/ipn.php HTTP/1.0" 404 23988 "-" "-"

It seems like PayPal tried to connect but got the page not found error. I checked and that folder definitely doesn't exist there. I created an extern folder in that location and put the ipn.php file there and retested, but I still haven't seen anything go through though I wonder if it just hasn't processed yet because I don't see payment having gone through the sandbox yet either.

I also saw this in the log:

173.0.82.126 - - [07/Jan/2013:13:27:29 -0500] "POST / HTTP/1.0" 200 37895 "-" "-"

I know 200 means sent, but I'm not sure what this was otherwise.

I did use the IPN simulator in sandbox and tried some different transaction types and it said successfully sent every time.
CityClub

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto renew memberships pending with PayPal Pro
January 07, 2013, 01:52:31 pm

That IP is indeed paypal's sandbox ipn machine

the url seems wrong in both cases, the url needs to be:

/sites/all/modules/civicrm/extern/ipn.php

You'll need to investigate and find out why civi is sending the wrong url to paypal. most of the paypal code is in CRM/Core/Payment/PayPal*

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 07, 2013, 04:14:41 pm
Thanks Lobo. I think I found where the path was in PaypalImpl and added in the civicrm/ that what missing. Interestingly enough the last few test payments I did haven't even come through to paypal yet. The recurring payment profiles were created and those ipn message say sent in paypal but the actual transactions haven't gone through yet so no ipn for them yet either. Will give it a bit more time and report back if it worked or not. 
CityClub

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 08, 2013, 08:57:55 am
So I waited and the payments went through to PayPal and I checked the IPN history and it says they sent back the IPN messages. But still nothing happened in Civi. In the log file, the hits from PayPal don't line up time wise correctly but the last few hits from PayPal were all:

173.0.82.126 - - [07/Jan/2013:16:44:50 -0500] "POST / HTTP/1.0" 200 37871 "-" "-"

All the 404's were from earlier I think. So I'm not sure why Civi still isn't actually getting anything. Do changes need to be made to the actual ipn.php file perhaps?
CityClub

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto renew memberships pending with PayPal Pro
January 08, 2013, 09:58:45 am

At this point, i suspect u will need to hire someone who can read / debug php code and track down whats happening and why

in general, u should not have to hack the paypal files to get things to work

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CityClub

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 0
    • Seattle CityClub
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.50
  • PHP version: 5.3.3
Re: Auto renew memberships pending with PayPal Pro
January 14, 2013, 08:52:09 am
So after taking a day or two off from thinking about this, I've now made some more progress:

I've learned that the pending membership (which has gone through paypal without issue) has no member since, start or end dates. My thought is that maybe having no dates means it can't trigger the new or current rule and is somehow defaulting to the pending status? When I edit one of these pending auto renewal memberships, the member since dates gets filled in with the current date and when I save it, it changes to current status and fills in the start and end date. However, the recurring contribution associated with it is still pending.

I then tested to see if running the membership status processor job (which has not been set to run automatically at this point) would update the pending memberships, but it doesn't; which make sense since there are no dates in the pending membership for the job to go off of.

I think there are going to be more issues to overcome still but it seems like a major one is that there are no dates when these auto renewal memberships come in.

Any thoughts? Thanks.
CityClub

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Auto renew memberships pending with PayPal Pro

This forum was archived on 2017-11-26.