latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Registration Notification URL not working

Home Forums Community Forum Registration Notification URL not working

This topic contains 7 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 7 months ago.

Topic Author Topic
Posted: Wednesday Jun 6th, 2012 at 4:49 am #15670

Your excellent customer support is required!

I am running some Registration Notification URLs that are a crucial part of my process and they don’t seem to be working.

My Setup:
Latest Version of s2member & Pro
Pro Forms with PayPal Express Checkout
s2member is in Sandbox Mode
Wordpress 3.3.2
W3 Total Cache (with Page, Object & Browser Cache enabled)

My Notification URL is setup as follows:
http://www.mydomain.com/notifications/SAMPLES/registration_01_db.php?secretKey=mypasswordhere&user_login=%%user_login%%&user_pass=%%user_pass%%
The php function stores the username and password to a DB table I have setup. I also have email notification setup.

When I run this link with test values in replace of the %% vals it works fine and the values are saved to my DB.

When I Register a new user, I get the ‘s2Member / API Notification Email ‘ with all the correct details… however the nothing happens in terms of storing the values to my DB. I believe that I have ruled out any errors in my php function, as I mentioned it runs correctly with dummy vals – so I am a little stumped as to why they are not working.

My only thought at this stage is to ask is it a known ‘PayPal Sandox’ issue?

Your guidance is greatly appreciated.

Cheers,
Dave

UPDATE 01:
I am also now trying the ‘Signup Notification API’ – just incase it needed to be in that one. Will update with results.

UPDATE 02:
I have tested it with the Signup API… no go on that either. With the Signup API, I also didn’t receive an email – where I still do for the Registration API. I have also updated my php function to do a very simple append to text file call which again works perfectly when I test my URL’s. I am now going to switch over to my live PayPal account and do a test on $0.01 pm to see it if IS indeed a Sandbox issue. Any opinions or suggestions in the mean time would be appreciated.

  • This topic was modified 4 years, 7 months ago by  David Martin.
  • This topic was modified 4 years, 7 months ago by  David Martin.

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Thursday Jun 7th, 2012 at 12:10 am #15753

Hi David.

It’s better to test with live 1 cent transactions than the Sandbox. This may be why the signup notification didn’t happen.

The registration one doesn’t have to do with PayPal at all, it’s just about account creation, so the notification happened, as you confirmed with the email you set up and got. The problem may be with the values not being added by the replacement codes in the URL you entered. To test that, you could create a log of your notifications.

Create this file in your root WordPress installation:
/s2-api-notification.php
[hilite pre_code]

[/hilite]

Now you attach this single script to all of your s2Member API Notifications you want to test, as follows:
http://yoursite.com/s2-api-notification.php?type=payment&txn_id=%%txn_id%% and all the rest of the replacement codes for each notification.

In that URL you need to use your site’s domain name, change the type value to match the notification you’re adding the URL to, and add the variables and replacement codes available for that notification.

In your case, it’d be like this:
http://yoursite.com/s2-api-notification.php?type=registration&role=%%role%%&level=%%level%%&ccaps=%%ccaps%%&auto_eot_time=%%auto_eot_time%%&user_first_name=%%user_first_name%%&user_last_name=%%user_last_name%%&user_full_name=%%user_full_name%%&user_email=%%user_email%%&user_login=%%user_login%%&user_pass=%%user_pass%%&user_ip=%%user_ip%%&user_id=%%user_id%%

You can add the replacement codes for custom profile fields you may be using as well.

The end result is that each API Notificiation you setup like this is logged by the PHP script, along with all the replacement codes you included.

I hope it helps. :)

Posted: Thursday Jun 7th, 2012 at 12:57 am #15758

Hi Cristián,

I have followed your instructions and I ran a manual test of that link – which successfully created and logged a new user registration – however I tested it (by manually adding a user in WordPress) and it didn’t work. Once again I recieved the email API notification but it doesnt seem to be processing the URL.

Given PayPal doesn’t effect the Registration API URL’s – I am getting worried that something else it wrong. Can you provide any other advice – or let me know how I can trouble shoot this a little further?

BTW – thanks for that great little php script… I will use that one if I ever get this thing working!

Thanks!!

Ah yes, if its of any use to you – here is the result of the manual test I did of the URL you supplied.

array (
‘type’ => ‘registration’,
‘role’ => ‘%%role%%’,
‘level’ => ‘%%level%%’,
‘ccaps’ => ‘%Ìaps%%’,
‘auto_eot_time’ => ‘%%auto_eot_time%%’,
‘user_first_name’ => ‘%%user_first_name%%’,
‘user_last_name’ => ‘%%user_last_name%%’,
‘user_full_name’ => ‘%%user_full_name%%’,
‘user_email’ => ‘%%user_email%%’,
‘user_login’ => ‘%%user_login%%’,
‘user_pass’ => ‘%%user_pass%%’,
‘user_ip’ => ‘%%user_ip%%’,
‘user_id’ => ‘%%user_id%%’,
)

——————————————————–

UPDATE:
I also tried de-activating ALL my other plugins and running the registration and again to no avail.

  • This reply was modified 4 years, 7 months ago by  David Martin.
  • This reply was modified 4 years, 7 months ago by  David Martin.
  • This reply was modified 4 years, 7 months ago by  David Martin.
  • This reply was modified 4 years, 6 months ago by  David Martin.
Posted: Thursday Jun 7th, 2012 at 6:28 pm #15850

Hi Cristian,

I just installed ran a test on another domain where I had WP and S2/S2Pro installed with the same URL and the Registration Notification has worked.

SO… I am not sure what the issue is, but I am thinking I will just un-install and re-install WordPress and s2/s2pro again which will HOPEFULLY resolve the issue.

I will post back after I have done it to let you (and anyone else interested) if it is fixed.

Thanks for you help mate.

Posted: Thursday Jun 7th, 2012 at 8:06 pm #15865

I have pin-pointed the issue after testing with the other site….

I exported all my settings and theme ect and imported them to my WP test install – all worked fine in terms of the API URL.

THEN – I installed a plugin called “WP SendGrid” for my SMTP emails via sendgrid.com – and then the API URL’s did not work. I uninstalled and deleted the plugin – but that did not fix it either (which is the same behaviour as my initial setup).

As far as I understand it – this SMTP plugin modifys the wp-mail() function – could this affect the API URL’s???

Do you guys use a SMTP plugin for emails that is compatible? or do you know of one? If so please recommend as I dont want this to happen again after I reinstall everything!

Here is the link to the plugin http://wordpress.org/extend/plugins/wp-sendgrid/

I would be interested to see if this error is replicated for you guys too. Also – if you could look at the plugin code and see if you can pin-point HOW not only does this plugin stuff the API URL up when it is installed… but even worse manages to KEEP it stuffed after it is deleted!

ALSO – I noticed a HUGE decrease in the speed of my administration area when performing ALL tasks after I installed this plugin. It caused my site to take anywhere from 2-5 minutes to process a subscription via paypal and present the thankyou screen – where on my other site (before I installed WP SendGrid) it happen in seconds.

WP SENDGRID IS THE DEVIL!

  • This reply was modified 4 years, 7 months ago by  David Martin.
  • This reply was modified 4 years, 7 months ago by  David Martin.
  • This reply was modified 4 years, 7 months ago by  David Martin.
  • This reply was modified 4 years, 7 months ago by  David Martin.
Posted: Friday Jun 8th, 2012 at 8:08 pm #15991
Raam Dev
Username: Raam
Staff Member

Hi David,

We recommend using the WP Mail SMTP plugin. That seems to work well with s2Member.

Posted: Saturday Jun 9th, 2012 at 5:31 am #16054

[SOLVED]

It was NONE of the above… it was a co-incidence that WP SendGrid was causing the error.

I am running a LAMP stack on a cloud server we had configured ourselves. We had not installed cURL for php5 – which controls the HTTP requests for s2member. So installing it solved the problem.

I use a FANTASTIC diagnose plugin called “Core Control” to find my issue.
LINK HERE: http://wordpress.org/extend/plugins/core-control/

I used this simple script to test if cURL was indeed disabled on my server by just uploading it to my ‘www’ folder and opening it in a browser:

<?php
function _iscurlinstalled() {
	if  (in_array  ('curl', get_loaded_extensions())) {
		return true;
	}
	else{
		return false;
	}
}
if (_iscurlinstalled()) echo "cURL is installed"; else echo "cURL is NOT installed";
?>

It allowed me to log HTTP requests made by WP and S2 and diagnose and resolve the problem. It also allows you to independently Test & Enable/Disable your HTTP protocols to rule out configuration issues.

For ANYONE having API URL problems / issues I would HIGHLY recommend installing this plugin to help pinpoint & solve your problem.

Cheers. Dave.

  • This reply was modified 4 years, 7 months ago by  David Martin.
Posted: Saturday Jun 9th, 2012 at 6:33 am #16056

Thanks for the tip, Dave! Will certainly check it out. Glad you solved your issue. :)

We recently started using a tool Jason developed to assses the server and see if we can spot a problem. Feel free to try it: http://www.s2member.com/r/server-check-tool/

Viewing 7 replies - 1 through 7 (of 7 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.