PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Members not degrading after failed payments

s2Member Plugin. A Membership plugin for WordPress®.

Members not degrading after failed payments

Postby ayoungren » April 26th, 2011, 12:45 pm

Hello,

I've had some members who's PayPal payments are skipped. PayPal tries to process again 5 days later, and then 5 days after that. If the user doesn't update their PayPal details their PayPal status changes from "active" to "suspended". At this point I would think that s2member would demote them back to free subscribers, but it is not. They retain their payed membership status. I'm not having any issues when users cancel their automatic payment, only when their payment is skipped and their PayPal status goes to "suspended". Any ideas on how to demote them to free members?

thanks,
Andrew
User avatar
ayoungren
Registered User
Registered User
 
Posts: 10
Joined: April 1, 2011

Re: Members not degrading after failed payments

Postby Cristián Lávaque » April 26th, 2011, 1:28 pm

Hi Andrew. :)

Could you tell me what your settings are here? WP Admin -> s2Member -> PayPal Options -> Automatic EOT Behavior
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Members not degrading after failed payments

Postby ayoungren » April 26th, 2011, 1:41 pm

Here it is:
Image
User avatar
ayoungren
Registered User
Registered User
 
Posts: 10
Joined: April 1, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » April 27th, 2011, 2:51 am

Thanks for reporting this important issue.

PayPal should be sending s2Member an IPN response with:
txn_type=recurring_payment_suspended_due_to_max_failed_payment

If s2Member is not behaving in the way you'd expect, let's start by having a look at your IPN logs. Please enable s2Member's Logging/Debugging routines from your Dashboard, under:
s2Member -> PayPal Options -> Account Details -> Logging/Debugging.

The next time this happens, please post a copy of your /s2member-logs/paypal-ipn.log file for review. Feel free to XXXX out any personally identifiable information.

Also, please state the version of WordPress, s2Member, and/or s2Member Pro that you're running at the time of this incident. We'll be happy to have a closer look at this for you.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » October 17th, 2011, 2:50 am

Hello fellow s2Member users!

Same problem here. Good thing is, that I have to logs. So let's have a look.

Membership on our site is based on yearly recurring payments. When a person fails to do these recurring payments and goes to "Suspended" in the PayPal, the respective account remains active in Wordpress.

Here are some logs from s2member-logs/paypal-ipn.log. I removed some of the fields which looked too sensivite or irrelevant:

'txn_type' => 'subscr_failed',
'subscr_id' => ***,
'time_created' => '14:25:06 Oct 06, 2010 PDT',
's2member_log' =>
array (
0 => 'IPN received on: Thu Oct 6, 2011 2:57:33 pm UTC',
3 => 's2Member `txn_type` identified as ( `subscr_failed|recurring_payment_failed|recurring_payment_skipped` ).',
4 => 'This `txn_type` does not require any action on the part of s2Member.',
5 => 's2Member does NOT respond to individual failed payments, only multiple consecutive failed payments.',
6 => 'When multiple consecutive payments fail, a special IPN response will be triggered.',
),

'txn_type' => 'subscr_failed',
'subscr_id' => *** (matching the previous one),
's2member_log' =>
array (
0 => 'IPN received on: Tue Oct 11, 2011 2:50:12 pm UTC',
3 => 's2Member `txn_type` identified as ( `subscr_failed|recurring_payment_failed|recurring_payment_skipped` ).',
4 => 'This `txn_type` does not require any action on the part of s2Member.',
),

'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
'recurring_payment_id' => *** (matching the subscr_id above),
's2member_log' =>
array (
0 => 'IPN received on: Sun Oct 16, 2011 3:24:46 pm UTC',
2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
),


I can see more users like this one.

Checking s2Member -> PayPal Options -> Automatic EOT Behavior

Enable s2Member's Auto-EOT System? -> Yes (enable the Auto-EOT System through WP-Cron)
Membership EOT Behavior ( demote or delete )? -> Demote (convert them to a Free Subscriber)
Refunds/Reversals ( trigger immediate EOT )? -> Refunds/Reversals (ALWAYS trigger an immediate EOT action)
Fixed-Term Extensions ( auto-extend )? -> Yes (default, automatically extend any existing EOT Time)


Plugin version is 111003. I can see new version is out, but change log deosn't say anything about these issues.

Could you have a look into this please? This way, we have to remote the users by hand, once we see them suspended in PayPal.

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » October 17th, 2011, 5:25 pm

Thanks for reporting this important issue.
Perfect, we'll take a look at this for you. Can you please post the full log entry from this IPN?
Code: Select all
'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
'recurring_payment_id' => *** (matching the subscr_id above),
's2member_log' =>
array (
0 => 'IPN received on: Sun Oct 16, 2011 3:24:46 pm UTC',
2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
),
* I just need to see all of the data s2Member was passed in this IPN, so we can see why s2Member bypassed this event on your installation.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » October 18th, 2011, 2:32 am

Hello Jason,

here it is:

Code: Select all
WordPress® v3.2.1 :: s2Member® v111003
Memory 24.63 MB :: Real Memory 25.25 MB :: Peak Memory 24.95 MB :: Real Peak Memory 25.25 MB
some-site.com/member/content/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '***',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '14:25:06 Oct 06, 2010 PDT',
  'verify_sign' => '***',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => '***',
  'first_name' => '***',
  'receiver_email' => 'info@***',
  'payer_id' => 'ZV9SYXU29JXKE',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '***',
  'outstanding_balance' => '***',
  'recurring_payment_id' => 'I-EU5***',
  'product_name' => 'Member',
  'ipn_track_id' => '***',
  's2member_log' =>
  array (
    0 => 'IPN received on: Sun Oct 16, 2011 3:24:46 pm UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
  ),
  'subscr_gateway' => 'paypal',
  'custom' => 'some-site.com',
)


1. I'm not sure where are the funny symbols behind "WordPress" or "PayPal" coming from.
2. The path some-site.com/member/content/wordpress/?s2member_paypal_notify=1 is also not valid anymore, Wordpress is now installed in /wordpress and not in /member/content/wordpress. But I assume it doesn't matter, since s2Member is able to log these requests. But I would still like to know where it is coming from.

Let me know if you need any other entries.

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » October 19th, 2011, 9:36 pm

Thank you once again.
I've identified this bug, and we'll have it corrected in the next official release.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » October 20th, 2011, 6:44 am

Hi Jason,

when can we expect the new release? I'm asking, because we have to demote these suspended users by hand each time and we are getting some every day.

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » October 20th, 2011, 2:29 pm

Thanks for your patience. Should be just a couple more days.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » November 22nd, 2011, 10:54 am

Hello Jason,

we just upgraded to latest version - 111105.

Was this fixed, or do we have to keep checking our s2Member IPN logs?

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » November 22nd, 2011, 11:56 am

Thanks for your patience.
Yes, this issue was fixed in the latest release.


FYI: Another related bug report can be found here, and still exists in s2Member v111105, but will be resolved in the next release. Until then, there are patch files available.
See: viewtopic.php?f=4&t=14876&start=25#p53674
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » November 22nd, 2011, 12:22 pm

Hello Jason,

I can't wait to see this finally working. I applied the quick fixes too. Thank you for the updates!

Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby foliovision » November 28th, 2011, 1:33 pm

Hi Jason,

it's still not perfect. Or there is something else. Could you please have a look at our logs?

This one is not demoted:
Code: Select all
PHP v5.3.8 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 24.90 MB :: Real Memory 25.50 MB :: Peak Memory 25.14 MB :: Real Peak Memory 25.50 MB
www.....com/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '...',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '12:09:41 Nov 13, 2010 PST',
  'verify_sign' => '',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => '@.net',
  'first_name' => '...',
  'receiver_email' => 'info@.com',
  'payer_id' => '...',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www.....com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-....',
  'product_name' => 'Member',
  'ipn_track_id' => '....',
  's2member_log' =>
  array (
    0 => 'IPN received on: Wed Nov 23, 2011 10:49:54 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
  ),
  'subscr_gateway' => 'paypal',
)

I can see that payer_status is "unverified" could that be it? I found a working example for this automatic degrading function and the user has "verified" in payer_status.

I see 3 more examples of this in our logs. Here's one more:
Code: Select all
PHP v5.3.8 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 25.07 MB :: Real Memory 26.00 MB :: Peak Memory 25.30 MB :: Real Peak Memory 26.00 MB
www.....com/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '....',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '06:47:37 Nov 18, 2010 PST',
  'verify_sign' => '...',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => '...@.....com',
  'first_name' => '...',
  'receiver_email' => 'info@....com',
  'payer_id' => '...',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www.....com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-....',
  'product_name' => 'Member',
  'ipn_track_id' => '..',
  's2member_log' =>
  array (
    0 => 'IPN received on: Mon Nov 28, 2011 11:02:16 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
  ),
  'subscr_gateway' => 'paypal',
)


My previous log entry I posted is also containing "unverified" user.

So it looks to me like you are not demoting unverified PayPal users. Please have a look into in and let us know if this is a bug, or if there is any reason for it.

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Cristián Lávaque » December 1st, 2011, 12:21 am

Martin, both have a line that says the payment attempts failed. Did you actually get the payment in your PayPal account, did you get the money from the person for that event that was logged?

'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Members not degrading after failed payments

Postby foliovision » December 1st, 2011, 3:17 am

Hello Cristián,

these notifications are sent by PayPal when it fails to do recurring payment and the PayPal subscription for the subscriber gets suspended. So s2Member plugin shoud respect that.

I sent similar log reports to Jason before, he fixed something in the code, released a new version and our situation has improved. But there are still some suspended PayPal subscriptions which go unnoticed by s2Member.

I found that these users are labeled as "unverified" on PayPal, so you might need to add a proper handling to that. I believe that if somebody signs up for a yearly subscription with automatic renewal and his account is not fully verified on PayPal, the subscription should get cancelled in s2Member, as it gets suspended on PayPal.

Please let us know if there is something more to consider. Is there any reason why unverfied PayPal subscribers are not automatically demoted? Do we need to put in our own tweak for this? If so, can Jason send us the required code?

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » December 2nd, 2011, 3:30 am

FYI: Just a quick heads up on this, because I believe it's related to your issue.
Jason Caldwell wrote:Thanks for your patience.
Yes, this issue was fixed in the latest release.


FYI: Another related bug report can be found here, and still exists in s2Member v111105, but will be resolved in the next release. Until then, there are patch files available.
See: viewtopic.php?f=4&t=14876&start=25#p53674

Also, please see this latest post/patch: viewtopic.php?f=4&t=14876&start=25#p54361
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » January 24th, 2012, 4:50 am

Hello Jason,

I did another check of logs.

The demoting of suspended PayPal payments still does not work. Here is one of many examples, it's always like this

1. subscr_failed -> s2Member does NOT respond to individual failed payments, only multiple consecutive failed payments.
2. subscr_failed -> s2Member does NOT respond to individual failed payments, only multiple consecutive failed payments.
3. recurring_payment_suspended_due_to_max_failed_payment -> Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.

Could you please fix this finally? Read about details below:

I'm attaching the logs for each of above here:

1.
Code: Select all
PHP v5.3.8 :: WordPress® v3.3 :: s2Member® v111206
Memory 24.16 MB :: Real Memory 25.25 MB :: Peak Memory 24.75 MB :: Real Peak Memory 25.25 MB
http://www.example.com/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'txn_type' => 'subscr_failed',
  'subscr_id' => 'I-C0...',
  'last_name' => '...',
  'residence_country' => 'US',
  'item_name' => 'Member',
  'payment_gross' => '30.00',
  'mc_currency' => 'USD',
  'business' => 'info@example.com',
  'verify_sign' => 'AUaxvSojqajxsiGA9qXfGuCulUctAi1buNKOlJUkMria7XqNpkaTEAn.',
  'payer_status' => 'unverified',
  'payer_email' => 'example@hotmail.com',
  'first_name' => 'Melanie',
  'receiver_email' => 'info@example.com',
  'payer_id' => '8M7...',
  'retry_at' => '02:00:00 Jan 15, 2012 PST',
  'item_number' => '1',
  'mc_gross' => '30.00',
  'custom' => 'www.example.com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'ipn_track_id' => 'Nc44E2a-KyUJ..m-mYCO8Q',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Jan 10, 2012 10:48:02 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `subscr_failed|recurring_payment_failed|recurring_payment_skipped` ).',
    4 => 'This `txn_type` does not require any action on the part of s2Member.',
    5 => 's2Member does NOT respond to individual failed payments, only multiple consecutive failed payments.',
    6 => 'When multiple consecutive payments fail, a special IPN response will be triggered.',
  ),
  'subscr_gateway' => 'paypal',
)


2.
Code: Select all
PHP v5.3.8 :: WordPress® v3.3 :: s2Member® v111220
Memory 24.17 MB :: Real Memory 25.25 MB :: Peak Memory 24.76 MB :: Real Peak Memory 25.25 MB
http://www.example.com/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'txn_type' => 'subscr_failed',
  'subscr_id' => 'I-C0...',
  'last_name' => '...',
  'residence_country' => 'US',
  'item_name' => 'Member',
  'payment_gross' => '30.00',
  'mc_currency' => 'USD',
  'business' => 'info@example.com',
  'verify_sign' => 'Au9eEOhF6wGsCamlh6xFr1tIaPFbAB3zFDEkDSgJpwHZWfax1qNplWC2',
  'payer_status' => 'unverified',
  'payer_email' => 'example@hotmail.com',
  'first_name' => 'Melanie',
  'receiver_email' => 'info@example.com',
  'payer_id' => '8M7...',
  'retry_at' => '02:00:00 Jan 20, 2012 PST',
  'item_number' => '1',
  'mc_gross' => '30.00',
  'custom' => 'www.example.com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'ipn_track_id' => 't-j3cDTJELCZ3rwquRCJsA',
  's2member_log' =>
  array (
    0 => 'IPN received on: Sun Jan 15, 2012 10:42:57 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `subscr_failed|recurring_payment_failed|recurring_payment_skipped` ).',
    4 => 'This `txn_type` does not require any action on the part of s2Member.',
    5 => 's2Member does NOT respond to individual failed payments, only multiple consecutive failed payments.',
    6 => 'When multiple consecutive payments fail, a special IPN response will be triggered.',
  ),
  'subscr_gateway' => 'paypal',
)


3.
Code: Select all
PHP v5.3.8 :: WordPress® v3.3.1 :: s2Member® v111220
Memory 24.70 MB :: Real Memory 25.25 MB :: Peak Memory 24.91 MB :: Real Peak Memory 25.25 MB
http://www.example.com/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '...',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '13:17:55 Jan 10, 2011 PST',
  'verify_sign' => 'AmMSXMdhc1-bUdgXp-KBAPr1UYNkAoIfSiVLkb70MURN2047-nLmzpB3',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => 'example@hotmail.com',
  'first_name' => 'Melanie',
  'receiver_email' => 'info@example.com',
  'payer_id' => '8M7...',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www.example.com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-C0...',
  'product_name' => 'Member',
  'ipn_track_id' => 'ta.f44oJ.1bazZubGVP-GA',
  's2member_log' =>
  array (
    0 => 'IPN received on: Fri Jan 20, 2012 10:42:04 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
  ),
  'subscr_gateway' => 'paypal',
)


I'll repeat my question from last time I contacted you about this:

I found that all of these users 'payer_status' => 'unverified' so you might need to add a proper handling to that. See above logs.

1. Is there any reason why your pluging should not demote users using PayPal subscriptions weher payer is not verified?

2. If there is, can you send us a piece of custom code which would fix this for us?

Here is one more example from the logs, this user was properly demoted:
Code: Select all
PHP v5.3.8 :: WordPress® v3.2.1 :: s2Member® v111206
Memory 25.59 MB :: Real Memory 26.00 MB :: Peak Memory 25.66 MB :: Real Peak Memory 26.00 MB
http://www.example.com/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '...',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '20:17:42 Dec 10, 2011 PST',
  'verify_sign' => 'A0uEaIiR68-zbTrTIDvzrysBqj-hADLx3JvK80HHMB6gpsoMv5xEQOZ3',
  'period_type' => 'Trial',
  'payer_status' => 'verified',
  'tax' => '0.00',
  'payer_email' => 'example@gmail.com',
  'first_name' => 'Michael',
  'receiver_email' => 'info@example.com',
  'payer_id' => 'X76PVRJ77QB44',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www.example.com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-RY...',
  'product_name' => 'Member',
  'ipn_track_id' => 'MTQgXXjtCJ5Gu8zCJtP8vA',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Dec 13, 2011 1:31:54 pm UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal¬Æ.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment` ) - or - `recurring_payment_profile_cancel` w/ `initial_payment_status` ( `failed` ).',
    4 => 'Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
    5 => 'Awake. It\'s Tue Dec 13, 2011 1:32:00 pm UTC. s2Member `txn_type` identified as ( `subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment` ) - or - `recurring_payment_profile_cancel` w/ `initial_payment_status` ( `failed` ).',
    6 => 'Member Level/Capabilities demoted to: Subscriber.',
  ),
  'subscr_gateway' => 'paypal',
  'subscr_id' => 'I-RY...',
  'period1' => '1 Y',
  'period3' => '1 Y',
  'item_number' => '1',
  'item_name' => 'Member',
  'ip' => '72.186.83.110',
)


Thanks,
Martin
Last edited by foliovision on January 25th, 2012, 9:08 am, edited 1 time in total.
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » January 24th, 2012, 3:28 pm

Investigating this now.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby Jason Caldwell » January 24th, 2012, 11:21 pm

Investigation completed. Thanks for your patience.

In your log entries, #1 and #2 are handled properly.
Your last code sample was also handled properly.

However, in log entry number #3 for txn_type = recurring_payment_suspended_due_to_max_failed_payment, s2Member says:
Code: Select all
Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.
This should actually say (i.e. what it actually indicates)...
Code: Select all
s2Member was unable to match the details in this IPN to an existing account holder. The value of subscr_id could not be established.
So why is this the case? That's the question.

In log entry #3 that you posted, please check the value of this variable in your Dashboard.
Code: Select all
'recurring_payment_id' => 'I-C0...',
Can you search your list of Users and find an account matching this Subscription ID? (aka: Recurring Profile ID, aka: Recurring Payment ID).
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » January 25th, 2012, 9:07 am

Hello Jason,

thank you for your investigation.

I checked the logs (the ones for the specific I-C0... subscriber ID are lost, but I can find other examples) and the subscriber ID in the log matches what's in Wordpress. I can also see two "subscr_failed" log entries for this subscriber ID received before "recurring_payment_suspended_due_to_max_failed_payment".

I'm attaching the log entry below. Notice 'payer_status' => 'unverified'.

Code: Select all
PHP v5.3.8 :: WordPress® v3.3 :: s2Member® v111220
Memory 24.56 MB :: Real Memory 25.25 MB :: Peak Memory 24.77 MB :: Real Peak Memory 25.25 MB
www.example.com/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => 'H...',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '07:33:52 Jan 06, 2011 PST',
  'verify_sign' => 'A1vv6uzd5erU0sVxynr5DDKG1tL2AS1Kc2Vzs4.bZeaCZwVzpya1xNNY',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => 'n...@yahoo.com',
  'first_name' => 'Nicole',
  'receiver_email' => 'info@example.com',
  'payer_id' => '4XE2VRDVYPK3G',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www.example.com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-AMM....',
  'product_name' => 'Member',
  'ipn_track_id' => 'i8j0PkeMv-kwt0ZSoh58ZQ',
  's2member_log' =>
  array (
    0 => 'IPN received on: Mon Jan 16, 2012 10:50:06 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal¬Æ.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
  ),
  'subscr_gateway' => 'paypal',
)


Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » January 25th, 2012, 1:26 pm

Thanks Martin.

Not to worry. payer_status = unverified is definitely not the issue. s2Member does not even look at this value, as it's related solely to the payer's PayPal account, and not to their account at your site.

So you confirmed that your failed log entry was also handled properly, because there was no match to the value of recurring_payment_id. Thus, s2Member should not take any action.

Let's look now at your latest log entry...

Can you search your list of Users in the Dashboard and find an account associated with this?
'recurring_payment_id' => 'I-AMM....',
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » January 26th, 2012, 5:15 am

Hello Jason,

1. "So you confirmed that your failed log entry was also handled properly, because there was no match to the value of recurring_payment_id."

Sorry about misunderstanding, there is a match for the value of recurring_payment_id "I-C0...".

2. "Let's look now at your latest log entry..."

I searched list of Users in the Dashboard and found the one with "I-AMM...". So that's not the problem here.

Do you have any other debugging steps in mind?

Is there any way of turning some debugging on, which would allow us to simulate requests from PayPal like for example following? That could allow us to see what gets added into logs and trace the code.

http://site.com/?s2member_txn_type=recurring_payment_suspended_due_to_max_failed_payment&recurring_payment_id=I-AMM...


Both users were created with older version of the plugin (back in January 2011, the version of the plugin was even older than that). So perhaps they are missing something? What could it be?

Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Re: Members not degrading after failed payments

Postby Jason Caldwell » January 30th, 2012, 4:28 pm

Thanks for the follow-up.

Hmm. Yes, it's possible that Users/Members who joined under an older version of s2Member are missing some information required in the latest copy. From your log entries, I'm not seeing what that is though. If these are matching up in your Dashboard to recurring_payment_id, I'm not sure where the hang up is yet. Let's make this our next step in debugging.

Please unzip and upload the attached file, allowing it override your existing copy of /s2member/includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php.

With this file in place, you'll have an additional log file here /s2member-logs/paypal-eots.debug.log. This log file will be generated in the same format, but with some additional details I can use to help you debug this further.

If this happens again, please send me the log entries from this file.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Members not degrading after failed payments

Postby foliovision » January 31st, 2012, 7:20 am

Hello Jason,

thank you for the tweaked code!

I put it up and we have some logs to debug already. I found this user with the same Paid Subscr. ID in Wordpress and he's not demoted.

paypal-ipn.log:
Code: Select all
PHP v5.3.8 :: WordPress® v3.3.1 :: s2Member® v111220
Memory 24.76 MB :: Real Memory 25.25 MB :: Peak Memory 24.95 MB :: Real Peak Memory 25.25 MB
http://www.....com/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '...',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '10:15:01 Jan 21, 2011 PST',
  'verify_sign' => 'A44EOaImnI.MwRNIZ36PF74Qu.zLAxe3E2dBM4wdijzy7Y7NjfKQiejA',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => '...@yahoo.com',
  'first_name' => 'Melony',
  'receiver_email' => 'info@....com',
  'payer_id' => 'NDXS...',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www......com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-NPR3...',
  'product_name' => 'Member',
  'ipn_track_id' => '5a7384005b39e',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Jan 31, 2012 10:41:54 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 'Ignoring this IPN request. The `txn_type/status` does NOT require any action on the part of s2Member.',
  ),
  'subscr_gateway' => 'paypal',
)


paypal-eots.debug.log:
Code: Select all
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => '...',
  'next_payment_date' => 'N/A',
  'residence_country' => 'US',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '10:15:01 Jan 21, 2011 PST',
  'verify_sign' => 'A44EOaImnI.MwRNIZ36PF74Qu.zLAxe3E2dBM4wdijzy7Y7NjfKQiejA',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => '...@yahoo.com',
  'first_name' => 'Melony',
  'receiver_email' => 'info@....com',
  'payer_id' => 'NDXS...',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '30.00',
  'profile_status' => 'Suspended',
  'custom' => 'www.....com',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '30.00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-NPR3...',
  'product_name' => 'Member',
  'ipn_track_id' => '5a7384005b39e',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Jan 31, 2012 10:41:54 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
  ),
  'subscr_gateway' => 'paypal',
  'subscr_id' => 'I-NPR3...',
  'period1' => '0 D',
  'period3' => '1 D',
  'item_number' => false,
)


Thanks,
Martin
User avatar
foliovision
Customer
Customer
 
Posts: 30
Joined: August 4, 2011

Next

Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest