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.

About: Andrew Stokes

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Deactivating S2Member on multisite – advice?

By:  Andrew Stokes in: Community Forum

voices: 2
replies: 1

3 years, 5 months ago  Mike (Volunteer Moderator)

Auto-login after register + some other bits

By:  Andrew Stokes in: Community Forum

voices: 2
replies: 19

4 years, 4 months ago  Cristián Lávaque

Viewing 2 topics - 1 through 2 (of 2 total)

Topics I've Started

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Deactivating S2Member on multisite – advice?

By:  Andrew Stokes in: Community Forum

voices: 2
replies: 1

3 years, 5 months ago  Mike (Volunteer Moderator)

Auto-login after register + some other bits

By:  Andrew Stokes in: Community Forum

voices: 2
replies: 19

4 years, 4 months ago  Cristián Lávaque

Viewing 2 topics - 1 through 2 (of 2 total)

My Latest Replies (From Various Topics)

Viewing 13 replies - 1 through 13 (of 13 total)
Author Replies
Author Replies
Posted: Thursday Aug 16th, 2012 at 10:49 am #22243

apologies – I found the list of %% replacement codes – under ‘signup confirmation email (pro form)’…. general comment stands though :-)

Although that list does not appear to be complete – I was using %%user_first_name%% & %%user_email%% & %%user_last_name%% & %%user_email%% – none of these occur in the list (I got them from somewhere…) Are there more that you’re not telling?

Wish List:
0) How about a function/capability for placing custom fields automatically into %% replacement codes?…

More importantly…
1) Comprehensive documentation (on a website/PDF – so it is searchable)
2) integrated Billing address functionality – if sites want to start selling physical goods to members (or like me the spec is changed half-way through), they don’t want to throw away s2member and start again with a different payment integration…
3) Auto-login after registration capability (check-box)…
4) Better invoicing functionality built-in

Posted: Thursday Aug 16th, 2012 at 9:30 am #22233

OK – I thought that shortcode attributes like ra and desc would be available as %% variables to pass to the ‘success’ url, but they aren’t. I have now used CV1 etc to pass these values through to the success page.

But the second question still remains :
1) how do I get at the custom pro-form fields so I can send them as CV fields as well? I investigated the ‘get_s2member_custom_fields’ function, but it appears I need to know the user_id for this – how do I get this when the user is not yet logged in????????

2)I would like to then put them in the registration email – clues?

3) is there a list somewhere of the %%vars%% available?
NB: I am having to find out all this by trial and error – a lot of it is pretty basic stuff IMO, but only seems to be rndomly documented in support requests – Better documentation please please!! Save yourself and every user a lot of headache…. doesn’t matter how great the code is if the documentation is not there…

Thanks
Andy

Posted: Wednesday Aug 15th, 2012 at 11:58 am #22114

correction – after further testing… got a bit confusing matching emails to payments there as emails were being delayed…

In fact it is simply the case that if there is that s2hacks.php file there, there is no confirmation email and the shortcode attribute parameters are lost in the custom success string.

I dont think the hack is working properly anyway ecause I am using the ws_plugin__s2member_custom_reg_field_s2member_level variable, and this appears only to be set if they are already logged in? Dunno how I would find out what level they have just paid for when they are not yet logged in, which is the current situation…

I have removed the s2hacks.php and given up on auto-login for new level 0 subscribers.

The other questions – how to get the remaining shortcode attributes to be passed to my success page, and how to get hold of the custom fields still remain. I suspect that the answer to the second question is something to do with ‘cv pipes’

Posted: Wednesday Aug 15th, 2012 at 10:57 am #22101

Custom ‘success’ url shortcode attributes and s2hacks.php mutually exclusive?

Update after further testing:
In the last test described above, I had tried removing the s2hacks.php file (with the login redirect code) altogether – this ensured that the confirmation emails went out from both paypal and credit card orders, although only some of the shortcodes worked (%%level%% & %%desc%% & %%ra%% all returned null values)… But of course the paypal return wasn’t going to this page ata all as described above.

I amended and reinstated the s2hacks.php file as follows (to bypass auto-login for the paid subscribers altogether):

<?php
add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
        if (!is_admin() && $vars['processed'] === 'yes') {
           if ($vars['_pmr']['ws_plugin__s2member_custom_reg_field_s2member_level']==0) {
                wp_new_user_notification($vars['user_id'], $vars['pass']);
                wp_set_auth_cookie($vars['user_id'], false, is_ssl());
                c_ws_plugin__s2member_login_redirects::login_redirect($vars['login']);
                }
        }
}
?>

Now both credit card and paypal purchases come back to the purchase confirmation page, and the confirmation emails go out.

Now however, it looks like the s2hacks.php is ignoring ALL the parameters (the shortcode attributes) from the custom success URL string.

Any way of ensuring that the values get passed on by s2hacks.php? (and any idea what happened to the missing ones?)

Posted: Wednesday Aug 15th, 2012 at 10:16 am #22098

and…
4) When I use paypal to pay (something I haven’t tried for a while – I have been doing credit card transactions), it just returns me to the originating pro form page with a text box at the top which says
“Thank you. Your account has been approved.
— You’ll receive an email momentarily.”

However, the Sign-up confirmation email is being sent out in this case….

Don’t get it at all any more….
Ideas?
Many Thanks

Posted: Wednesday Aug 15th, 2012 at 9:44 am #22096

Thanks for your help – sorry to go on and on – but this project is going on and on!

1) the only emails being sent out (even though the transaction is successful and recorded as such in the log) are the New User Registration (to admin) and Username/passwords (to customer). The ‘Signup confirmation Email (Pro Form)’ is not being sent…

2) It seems that though I have setup a custom ‘success’ URL in my pro forms, it is not working:

success="/subscription-confirmation/?email=%%user_email%%&fname=%%user_first_name%%&lname=%%user_last_name%%&subscr_id=%%subscr_id%%&sub_level=%%level%%&desc=%%desc%%&sub_value=%%ra%%"

… the credit card purchaser goes to /subscription-confirmation/ when they have completed the transaction, but without the URL paramaters…

3) When I do get it working (oh happy day!), what happens to the content of the custom (delivery address) fields I added to the level 4 form? Can I get these as shortcodes? can I get them emailed to me? are they stored somewhere in the database?

FYI:
A) I have disabled auto-login for the paying subscribers (level 1 up), whilst retaining it for free subscribers (level 0). I did this because I thought it might be messing up the post-transaction process. I used the code below in s2hacks.php:

<?php
add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
        if (!is_admin() && $vars['processed'] === 'yes') {
                wp_new_user_notification($vars['user_id'], $vars['pass']);
                wp_set_auth_cookie($vars['user_id'], false, is_ssl());
		if ($vars['_pmr']['ws_plugin__s2member_custom_reg_field_s2member_level']==0) {
                c_ws_plugin__s2member_login_redirects::login_redirect($vars['login']);
                }
        }
}
?>

B) I don’t have Payflow account details filled in on this installation – I understood from reading the notes that it only applied to recurring billing and I am not using recurring billing. I have however filled in the Paypal API section…

I do appreciate any help you can give me on this, as I am waaaay beyond deadline now on this and struggling…

Thanks,
Andy

Posted: Tuesday Aug 14th, 2012 at 10:41 am #22002

whoops – I spoke too soon…
I see you have thought about physical shipping. the new ‘ns’ ‘no shipping’ directive doesn’t work in pro forms though, so I have added custom fields (optional) to the level 4 form. That works – Phew!

I set the shipping fields up so they all contain ‘same as card’ by default, so the customer wouldn’t have to fill in twice.
However the first thing the customer sees is the shipping address fields which they fill in, then hit payment button and the rest of the card address fields come up and they then have to fill it in again…

It would be much better for the client if the behaviour was less kludgy and more like a standard shopping cart – ie the card address then the shipping address (and in an ideal world – the shipping address autopopulated…)

Any way to do this? Bearing in mind that it is only for one level….

PS still haven’t got anywhere on the post-transaction emails, so any help would be great…

Cheers,
Andy

Posted: Tuesday Aug 14th, 2012 at 9:48 am #21990

… am also wondering what I can do if subscriber makes direct payment (credit card) and wants to give a different shipping address (on this scenario, level 4 subscribers also receive printed subscription by post)….

This is an additional requirement from client – maybe s2member was not the right choice …… :-(

Thanks for your help… it is appreciated!

Posted: Tuesday Aug 14th, 2012 at 8:13 am #21965

Hi,
The video is only about paypal standard (and the other one is just for payflow) – a step-by-step account of s2member configuration for paypal pro would be invaluable….

I guess where I am struggling is in terms of figgering out what I need to do to handle post-transaction. At the moment, credit card payments are successfully being processed, and the new subscriber is being logged in and sent to the page I have setup in ‘one-time offers’, but the new subscriber gets only an email titled ‘congratulations your membership has been approved’ and another with username and password. There is no receipt of payment (the most important bit for many!).

Do I need IPN on for this? or is that just for my own back-end stuff?

I have set up a ‘sign-up confirmation email (pro form)’, but this doesn’t appear to be sent…

Any thoughts?
Many thanks

Posted: Friday Aug 10th, 2012 at 6:53 am #21695

Thanks a lot – I’ll see how I get on.
I haven’t come across a detailed s2member/paypal pro integration guide – is there such a thing?
I can’t help thinking it would save you a lot of time if there was!

cheers, Andy

Posted: Thursday Aug 9th, 2012 at 9:44 am #21631

Update:
Switching off payflow api just ended up giving me a different set of errors so have switched to live paypal account for testing which works, but, now I am able to make credit card purchases….

6) What is the procedure to setup invoice generation for customers paying by credit card?
At the moment they just get taken back to my Thank-you page and sent an email saying they are now registered on the site…
Also if I am a new user and I make a purchase the correct landing page is selected (using the one-time only code above). However, if I am already registered (for free) and decide to purchase a membership, i get returned to the payment page but with the text ‘Thank you. Your account has been updated – Please log back in now.’ in the response space… I need make sure that these ‘upgraded’ members get treated the same way as new membership purchasers – ie receive an invoice…

Any help?
Thanks,
Andy

Posted: Thursday Aug 9th, 2012 at 7:10 am #21612

PS – I have solved the problem for now at least…. switched off payflow API stuff – dunno if that was the problem or something else, but I am able to make payments on sandbox again….

Posted: Thursday Aug 9th, 2012 at 5:58 am #21610

Many Thanks for that – it makes more sense now… :-)

1) The ONE-TIME OFFERS options looks like it will do the trick – I have set up a 1st time page for paid subscribers (level 1 & 2) as a thank-you page and set this to first-time only view….
Haven’t been able to test it yet though as I am now encountering a new problem (see below)…

3) You are right – your code is not to blame – this is a problem with the mailhide feature of wp-recaptcha plugin, which is attempting to hide the completed email field content (and breaking it in the process). Unfortunately there seems to be no way of switching it off (that works) within the form – their [nohide] tag doesn’t have an effect when placed around the whole s2member form shortcode… Unfortunately I need emails in posts and pages to be hidden…

4) I have to move the site now to the final domain, so I am sure I will have a lot of fun with this!

New problem is I am getting a’Error #1. User authentication failed.’ message when attempting to do a paypal payment – this is new and I don’t think I have changed anything (to a sandbox paypal pro account) – any ideas?

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

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.