Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-23T03:38:23-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6467 2011-05-23T03:38:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15622#p15622 <![CDATA[Re: EOT for Failed Payments?]]> Gotchya. I see what you're trying to accomplish now.

Yes, for txn_type=recurring_payment_suspended_due_to_max_failed_payment
%%eot_del_type%% = ipn-cancellation-expiration-demotion
Or, if you've configured s2Member to delete, it will be:
ipn-cancellation-expiration-deletion

No, we don't currently have a separate "type" string for this event, but I can certainly now why you want one. I'll see what we can do about that. Until then, you could do something like this.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_action
("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_before_demote", "my_custom_function");
function my_custom_function($vars = array())
    {
        if($vars["paypal"]["txn_type"] === "recurring_payment_suspended_due_to_max_failed_payment")
            $vars["__refs"]["eot_del_type"] = "ipn-cancellation-failed-payments-demotion";
    }
?>

Now you will get this "type" string:
ipn-cancellation-failed-payments-demotion

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 3:38 am


]]>
2011-05-20T18:49:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15525#p15525 <![CDATA[Re: EOT for Failed Payments?]]>
line 1268:
Code:
(preg_match ("/^(subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment)$/i",$paypal["txn_type"]) && ($recurring = 1))/**/

line 1294:
Code:
$paypal["s2member_log"][] = "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).";

neither explicity map that PP IPN event to an s2m %%eot_del_type%%. So I'm guessing it's set to the "no/else" here..
line 1314:
Code:
$eot_del_type = ($is_refund_or_reversal) ? "ipn-refund-reversal-demotion" : "ipn-cancellation-expiration-demotion";


So I am hoping for confirmation that:
a Max Failed Payments IPN triggers an s2m api "EOT/Deletion" Notification with %%eot_del_type%%="ipn-cancellation-expiration-demotion" ?

My goal in all this is to be able to alert the site owner (using s2m api notifs) when a member has been Suspended (in Paypal) and Demoted (in our site) due explicitly to MaxFailedPayments. This is IMPORTANT because this is probably a member who did NOT INTEND to lose access to the site, as opposed to someone who Cancelled (or did a Refund, Reversal, or Chargeback).

Thanks!
Todd

Statistics: Posted by toddz88 — May 20th, 2011, 6:49 pm


]]>
2011-05-20T02:12:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15484#p15484 <![CDATA[Re: EOT for Failed Payments?]]>

user-removal-deletion ( i.e. manual removal/deletion )
auto-eot-cancellation-expiration-demotion
auto-eot-cancellation-expiration-deletion
ipn-cancellation-expiration-demotion
ipn-cancellation-expiration-deletion
ipn-refund-reversal-demotion
ipn-refund-reversal-deletion


But.. i'm still not clear which is used for Failed Payments (the IPN event "recurring_payment_suspended_due_to_max_failed_payment").

Statistics: Posted by toddz88 — May 20th, 2011, 2:12 am


]]>
2011-05-19T18:27:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15448#p15448 <![CDATA[Re: EOT for Failed Payments?]]>
Just want to clarify since the documentation under "EOT/Deletion Notification" does not explicitly mention Failed Payments, and does suggest that an EOT "is triggered" for these situations where we'd want to immediately deny the member access to the site:

An EOT is triggered immediately when you refund a Customer, when a Customer forces a chargeback to occur, or when a paid Subscription ends naturally ( i.e. expires ), and your Payment Gateway sends s2Member an EOT ( End Of Term ) response.

Statistics: Posted by toddz88 — May 19th, 2011, 6:27 pm


]]>
2011-05-18T19:14:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15329#p15329 <![CDATA[Re: EOT for Failed Payments?]]> Statistics: Posted by Cristián Lávaque — May 18th, 2011, 7:14 pm


]]>
2011-05-18T18:58:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15326#p15326 <![CDATA[Re: EOT for Failed Payments?]]> Thanks for the great question.
s2Member considers this an immediate EOT.
No EOT Time is set. Instead, s2Member demotes and/or deletes ( based on your configuration ), immediately in this scenario, txn_type=recurring_payment_suspended_due_to_max_failed_payment

Statistics: Posted by Jason Caldwell — May 18th, 2011, 6:58 pm


]]>
2011-05-17T13:27:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15183#p15183 <![CDATA[Re: EOT for Failed Payments?]]> Statistics: Posted by Cristián Lávaque — May 17th, 2011, 1:27 pm


]]>
2011-05-17T12:58:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6467&p=15177#p15177 <![CDATA[EOT for Failed Payments?]]>
Is it basically immediate / instant / now (the time the ipn is received)?
Or is it calculated somehow (as Cancellations are)?

Statistics: Posted by toddz88 — May 17th, 2011, 12:58 pm


]]>