Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-31T12:41:05-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14752 2011-08-31T12:41:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33517#p33517 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]> ( i.e. it's unable to resolve domains ).

Statistics: Posted by Jason Caldwell — August 31st, 2011, 12:41 pm


]]>
2011-08-31T08:37:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33498#p33498 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]> WP_Error class by wp_remote_request() to determine how...

your URL failed in one way or another
...could also help.

So, the debug solution is archived here for anyone having the same problem to check... call wp_remote_post and check the return. Run from a WP page...

<!-- API Notification Test -->
<?php
$result = wp_remote_post('<put your notification url here>');
echo print_r($result);
?>

In any case, not sure why I'm having a problem resolving the domain name and the IP address works, but that's a matter for another thread!
T

Statistics: Posted by tkittredge — August 31st, 2011, 8:37 am


]]>
2011-08-31T00:14:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33477#p33477 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]> Thanks for the heads up on this thread.

Is there a way for me to understand/debug/confirm that the test is firing from s2Member API / Notifications?

One way to further test API Notifications is to enter an email address for each of the Notifications. That way you'll get an email when each of these Notifications are fired, and if your URL did not get called upon, you'll at least know the event did fire, it's just that your URL failed in one way or another.

Statistics: Posted by Jason Caldwell — August 31st, 2011, 12:14 am


]]>
2011-08-30T18:49:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33436#p33436 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]>

I'll email Jason about your other questions. I'm pretty sure the Notifications API doesn't have a logging or debugging routine, that's up to the script that it calls, I guess, but I can understand that there's stuff before the script is even called. I'll wait for Jason's comments.

Statistics: Posted by Cristián Lávaque — August 30th, 2011, 6:49 pm


]]>
2011-08-30T14:40:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33362#p33362 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]>
I discovered that the remote() function of the c_ws_plugin__s2member_utils_urls class in the utils-urls.inc.php file in the /wp-content/plugins/s2member/includes/classes/ directory uses wp_remote_request() to fire the notification urls.

So... I plugged wp_remote_post() into my test case and it returned "Couldn’t resolve host ‘my.domain.com’". So I plugged in the IP address into the s2member API / Notifications configuration instead of the domain name and it now fires successfully and runs the script.

Not sure why the domain name is not resolving (it's the same domain as where the notification request is running, complete with http://... (non-relative)) but there appears to be a DNS issue of some type.

It would be nice if the s2Member Notification URL could log a return value when fired for debugging purposes. Perhaps this is the case and I've missed it.

So, other than the domain name not being resolved, problem solved. Any clues to that problem appreciated!

Statistics: Posted by tkittredge — August 30th, 2011, 2:40 pm


]]>
2011-08-30T08:57:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33341#p33341 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]>
<?php /* Usage: http://domain.com/notification_test.php */

$file = "notification_test.txt";
$data = 'success!';
file_put_contents($file, $data);

?>

This creates a 'success!' entry in the file (notification_test.txt) when fired from a browser address bar, from PayPal IPN Test environment, and from within WP using window.open, however NOT from s2Member API / Notifications (I'm testing in sandbox mode.)

Is there a way for me to understand/debug/confirm that the test is firing from s2Member API / Notifications?

Statistics: Posted by tkittredge — August 30th, 2011, 8:57 am


]]>
2011-08-29T17:41:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33290#p33290 <![CDATA[Re: Registration Notification URL Not Firing... Debug?]]>
If you have s2Member Pro http://s2member.com, you can either specify the URL as the one to show the user after payment, or you can customize the s2Member one.

WP Admin -> s2Member -> Paypal Buttons -> Shortcode Attributes -> success
WP Admin -> s2Member -> PayPal Options -> PayPal PDT -> Auto-Return Page Template


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — August 29th, 2011, 5:41 pm


]]>
2011-08-29T16:08:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14752&p=33268#p33268 <![CDATA[Registration Notification URL Not Firing... Debug?]]>
What is the best method to debug the call? Am I missing some other configuration / hosting requirement for s2M?

Statistics: Posted by tkittredge — August 29th, 2011, 4:08 pm


]]>