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™

Auto-transfer to WP Registration after Payment

s2Member Plugin. A Membership plugin for WordPress®.

Auto-transfer to WP Registration after Payment

Postby Raam Dev » November 7th, 2011, 1:58 pm

After someone subscribes via Paypal, they are transferred back to my site where s2Member displays a page with a link to go to the Registration page. I'd like to automatically transfer buyers to the registration page to reduce the number of steps required during the subscription process.

I tried modifying s2member/includes/templates/returns/default-return.php by adding a JavaScript redirect that automatically transfers new subscribers to the register page:

Code: Select all
<body onLoad="window.location.href='https://raamdev.com/wordpress/wp-login.php?action=register'">


However, this technique seems to work sporadically. Sometimes the registration page is displayed and other times a message appears that tells paying subscribers that Registration is disabled (I have Open Registration disabled, so only paying subscribers can register). Also, when this happens users never receive the Signup Confirmation email, so they essentially have no way of filling out the registration form.

I'm not sure if there's a better way of doing this or if I'm missing something with how the registration process works. Any help would be greatly appreciated.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Auto-transfer to WP Registration after Payment

Postby Eduan » November 7th, 2011, 2:16 pm

Are you using pro-forms or PayPal buttons?

If it's pro-forms then try under PayPal® Pro Forms -> Custom Return URLs On Success.

If it's PayPal buttons then I couldn't tell you what to do. :|

Hope this helps. :)
Also remember to report back,
otherwise you leave me worrying. ;)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Auto-transfer to WP Registration after Payment

Postby Raam Dev » November 7th, 2011, 2:19 pm

Thanks for the reply Eduan.

I'm using Paypal Buttons, not Paypal Pro Forms (can't afford s2Member Pro just yet).
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Auto-transfer to WP Registration after Payment

Postby Eduan » November 7th, 2011, 2:25 pm

Searched a little and here's the result:
success="" Success Return URL ( optional ). s2Member handles this automatically for you. However, if you would prefer to take control over the landing page after checkout ( i.e. your own custom Thank-You Page ), you can. If supplied, this must be a full URL, starting with http://. Note, s2Member will NOT use this value if an existing account holder is being modified. s2Member handles account updates ( i.e. billing modification ) in a more dynamic way. Your Success Return URL is only applied to (new) Customers.

Found this under PayPal® Buttons -> Shortcode Attributes ( Explained ) -> success=""

Hope this helps. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Auto-transfer to WP Registration after Payment

Postby Cristián Lávaque » November 8th, 2011, 1:46 am

Right Eduán, it's the success attribute for PayPal buttons, but comes with the Pro add-on. WP Admin -> s2Member -> PayPal Buttons -> Shortcode Attributes -> success

Raam, you need to let users arrive at the s2Member return page or s2Member won't set the cookies that let him register when you have Open Registration disabled. Even if you had enabled that, they'd be registering but s2Member would not know they paid, so would give them Level 0.

Actually, if I'm not mistaken, by default the person would be shown the registration page after checkout at PayPal... I may be wrong, though. Anyway, this hack may help you viewtopic.php?f=36&t=6386#p14932
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: Auto-transfer to WP Registration after Payment

Postby Raam Dev » November 8th, 2011, 5:13 pm

Thanks, Cristián. Unfortunately, I don't have s2Member Pro yet so I can't use the success Shortcode attribute.

Also, the hack you pointed to only works if the page I want to redirect to *is not* the registration page. Since the hack essentially bypasses setting the cookies, redirecting to the registration page results in "Registration Disabled" (since s2Member doesn't know the person just purchased something). On the plus side, with the hack the Paypal Confirmation email is generated, which allows the subscribers to click the link (thereby generating the cookies) and then registering.

However, my intention with redirecting to the registration page was to prevent the number of steps to complete registration. Requiring a subscriber to check their email and click a link to register defeats that purpose.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Auto-transfer to WP Registration after Payment

Postby Cristián Lávaque » November 11th, 2011, 12:34 am

Yes, I understand that. I was actually meaning the last part of the post I pointed you to. ;)
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


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 1 guest

cron