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: Richard Mataka

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


My Latest Replies (From Various Topics)

Viewing 25 replies - 1 through 25 (of 47 total)
Author Replies
Author Replies
Posted: Monday Jul 16th, 2012 at 5:57 pm #19417

OK im really at the point of frustration here (I figured out why the success variable didnt redirect). BUT IN a normal s2 flow this works

sales page -> payment -> registration -> Auto Login -> Upsell -> members area

And it upgrades the account properly from LEVEL 1 to LEVEL 2

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());
c_ws_plugin__s2member_login_redirects::login_redirect($vars[‘login’]);
}
}

This seems to be the code that tells subsr-modify how to find the account

wp_new_user_notification($vars[‘user_id’], $vars[‘pass’]);
wp_set_auth_cookie($vars[‘user_id’], false, is_ssl());

NOW

I need it to be

sales page -> free registration -> payment -> upsell -> members area.

I’m using the PayPal pro forms, to do the FREE registration, but then when it redirects to the payment
it treats it as a NEW user! Its NOT finding the current logged in user on return and im unsure WHY. Can you
please advise here

Ricky

Posted: Monday Jul 16th, 2012 at 4:30 pm #19412

The success=”” is NOT working in the PP Pro forms. I have

http://www.s2member.com/forums/topic/create-free-registration-then-custom-redirec/

Please advise how to make this work

Thanks
Ricky

Posted: Monday Jul 16th, 2012 at 4:12 pm #19410

Its redirecting to this

http://xxx.com/members/?page_id=0

How do i stop this from happening. Its totally ignoring the success= attribute.

Thanks
Ricky

Posted: Monday Jul 16th, 2012 at 4:06 pm #19407

http://www.s2member.com/kb/how-to-create-a-registration-thank-you-page/

this does not work what im trying to say.. it redirects me to members area.. not what I put in my success url
or the redirect_to inside the hack….

Posted: Monday Jul 16th, 2012 at 4:00 pm #19406

I even tried.. making a template page with a wp_redirect and putting success=”/my-redirect/” it just logs me into the members area under my profile page. How do i modify this behavior

Thanks

Posted: Monday Jul 16th, 2012 at 3:52 pm #19404

I tried the success=”http://www……” in the short code.. and ita not working. I need to deal with this fast so how do i make this work?

Thanks
Ricky

Posted: Monday Jul 16th, 2012 at 12:52 am #19323

Ok I have tested the 1 click upsell and was able to tweak it in such a way to pass back all the needed
info for s2member. SO this results in 2 transits being created with all the correct data. However, when the user signs up it only recognizes the return transit on registration. So it treats the 1click up sell transit as new user.

So this leaves me back to square 1 basiclly, some how the user needs to have an account 1st for the modify
to work. However, i cant figure out for the life of me how i would create a new user programmaticly.

I guess my only option here would be for the user to create an account first like I had it before the 1click upsell
so the way it was working was

LEVEL1 -> Registration -> LEVEL2 upsell -> members area — Which Works Fine!

The way I have tried is

LEVEL1 -> LEVEL2 upsell 1click -> members area – Which works, but treats it as 2 signups since it cant hit the modify.

I guess im going to have to figure out a way to inject the regiatration before the 1click upsell – thats the only way i can possible see doing this because I also cant figure out, how the heck the transits are read. I do see in

configure_user_registration

That it reads them there, but i have to explore that a little further to see if I can read in 2 transits at the same time
for the 1 user on registration.

My suggestion in your next release, is make the code a little more flexibale in terms of flow.. not user options.
But then again, im not a wordpress expert – so maybee there is hooks or filters im missing out on here.

Thanks
Ricky

Posted: Sunday Jul 15th, 2012 at 8:59 pm #19318

Hey quick question thats really important here. Why does PayPal Return and PayPal Notify do the same thing in reguards to variable and registration manipulations? It seems kindof redundent. I would think that the IPN would be all thats needed and the Notify Files would handle this type of processing.

the only logical thing i can think of here, is instead of waiting on an IPN the rtn is giving the user immediate
processing. However, i dont see any double checks to wheather the IPN has processed first? Unless im missing something here.

In order to make the 1click clickbank upsell work, its ha to be one or the other, as the main communications would funnel through the IPN.

Ricky

Posted: Sunday Jul 15th, 2012 at 3:24 pm #19309

Hey dude

Im back at it again trying to make the undo-able work :) I really need to implement clickbank 1click upsells
if you can just shed some light on what s2 member is expecting with the buttons I can make something happen. I think the biggest thing is the md5 verification. So i may need to just diable that cross check. So do you know what files that happens in? Im guessing its the same Notify and RTN files. Anyway thanks again for all your help in this

Ricky

Posted: Thursday Jul 12th, 2012 at 10:18 pm #19104

Hey dude!

The funnel is complete! The logic worked perfectly

http://screencast.com/t/AmPhGDuEeW

Where you see 3,4 is the items purchased stored with the member for logical demotion on cancellation

—- I COULD NOT HAVE DONE THIS WITHOUT YOU — :) S2 is lucky to have you

Anyway i stil cant test demotion untill my clickbank products are live – still under approval process.
One thing i noticed is that since im updating the s2_custom in the DB domain.com|3,4 – I noticed
that the PP RTN and NTFY scripts both fight to do it first ending up with domain.com|3,4,4
but thats not a big deal. I just wrote logic cross check before adding to.

Now as far as cancellation goes. The goal is to check the return ITEM in the IPN like
domain.com|4 against the stored custom|3,4 in the user_meta – and then demote properly
according to what Item was cancelled.

The only thing i have left to wonder is

paypal-notify-in-subscr-or-rp-eots-w-level.inc.php

Will the (domain.com|4) sent back in the IPN be available in that file – the reason being is

auto-eots.inc.php

Logic is to setup the EOT system for wpcron – so my hack was to store the canceled item in user_meta
so that when EOT runs in the background it knows how to demote accordingly

Well with the (paypal-notify-in-subscr-or-rp-eots-w-level.inc.php) file
that takes a DIRECT IPN – so the is no CRON EOT setup, but knowing how IPN systems work,
im pretty much assuming that custom=domain.com|4 – originally passed in will be passed back
being my identifier for demoting properly against the stored s2member_custom = domain.com|3,4

Am i correct here? Or does this just setup an EOT? The code looks like it just demotes right then
and there NO EOT

And I just cant see how this file fits in? Do I have to worry about it?
paypal-notify-in-subscr-rp-payment-w-level.inc.php

Thanks bro for all your help here! You been great. But Im finally on home stretch!

Ricky

Posted: Thursday Jul 12th, 2012 at 9:08 pm #19100

OK issue with the hack LOL

Now i got to disable the activation and It logged me right in, however the hack/OneTimeOffer
URL did not get taken. – Now i just noticed that the plugin has an automatic login behavior.
Maybee if i kill that s2 will take on its flow.

Lets see!

Posted: Thursday Jul 12th, 2012 at 9:02 pm #19098

Never mind on the Buddy Press. I found a plugin to disable that nonsence :)

http://buddypress.org/community/groups/bp-disable-activation/

Posted: Thursday Jul 12th, 2012 at 8:51 pm #19097

Oh and awesome man! 11 Years GPL BABY LOL – :)
I wish i found the time to be part of open source projects, I used to be an expert at oscommerce back in 2004

RIcky

Posted: Thursday Jul 12th, 2012 at 8:49 pm #19096

Hey dude

Ok I implimented the s2member hack and set the 1st login to go to the upsell page then BAMO

Sign Up Complete!
You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.

Buddy Press is forcing the email activation. I think thi is screwing up the flow, any thoughts on that?

Thanks
Ricky

Posted: Thursday Jul 12th, 2012 at 8:30 pm #19094

In my post 2 above – disreguard my quesiton about the redirect – I missed

Then you can set the first login to redirect the person to your upsell sales page. Dashboard -› s2Member® -› General Options -› One-Time Offers (Upon Login)

Thanks!

Posted: Thursday Jul 12th, 2012 at 8:24 pm #19093

Hey

I just watched the video on ccaps, the only issue I have with them for my situation is I need 2 levels
to identify 2 subscriptions. ccaps does not offer flexibility in that reguard. Unless Im missing something

Anyway have a look at my above post when you get the chance :)

Thanks again!
Ricky

Posted: Thursday Jul 12th, 2012 at 7:37 pm #19090

Hey Christian

Thanks for all the informative responses you have given me. A++ Without your help here id be stuck
in this code for much longer :)

Level 1 -> CB checkout -> Registration -> Auto login -> Upsell Level 2 -> CB checkout

that funnel sounds like the perfect solution, so my question then is

c_ws_plugin__s2member_login_redirects::login_redirect($vars[‘login’]);

Can I replace that with wp_redirect to the upsell page?
So it autologs in and then redirects to the correct place (UPSELL LEVEL2 )?

Also After the second checkout what happens when it realizes they are logged in
where would they be redirected to, the Home Page? Or should I just use the
redirect variable in the shortcode to handle that?

And sorry for being a pain in the ass :)

I have Buddy Press installed which wants to activate the account? Im new to buddy press
so you know of a way to disable that behavior.


Ok so the way I have it now is basically hacking the custom to always carry the vars I need. I will watch the
ccaps video to try and understand how to use ccaps – as I guess I built my own ccaps last night LOL

Anyway thanks for the outstanding help. I think im almost there man :)

Also I understand Code/Marketing I have been marketing/coding for over 11years now
and I also use that knowledge when writing code. I always advise good programmers
to learn a little marketing it will help them be more of a company asset

Thanks
Ricky

Posted: Thursday Jul 12th, 2012 at 2:40 pm #19061

Hi Christian

1) I didnt know that you can | custom or i would have not hacked it that way LOL
anyway – what variables are the stored in after the PIPE? Are they accessable on ALL
RTN and NOTIFY scripts?

2) ccaps What are these and How do I use them in my implimentation above. The goal of
the code I had written was to

1) pipe ITEM# in custom
2) store in DB
3) ON cancel it will return the pipe custom orignally sent
so we now store it for EOT processing
4) On EOT processing read cancel ITEM# match it against purchased items 1,2,3
demote based on what was canceled.

Thats the goal here and what I have written but this leads me into #3

3) Now since the user needs to be logged in to do the upgrade this puts me in a pickle
this code was really not though through in a marketing perspective I gotta say.

The Funnel is as follows:

LEVEL1 -> Store Transits -> UPSELL LEVEL 2 -> Store Transits -> registration = 2 NEW accounts BAD

The Funnel should be

LEVEL1 -> Store Transits -> UPSELL LEVEL 2 -> Look up email upgrade OR new account -> registration

So from a code standpoint the upsell should be purchased from inside the members area
From a marketing standpoint the Final Registration should be done after the Funnel and purchasing
is complete.

So with that being said.. is there a way to create the registration somewhere so that when UPSELL LEVEL2
is presented.. atleast s2Memebr can function on its normal routines?

Thanks
Ricky

Posted: Thursday Jul 12th, 2012 at 2:45 am #18997

Ok hit a problem on the upgrade, I basically went to purchase level 2 and the IPN and RTN logs all look great
however, it asks me to re register again for some reason, its not finding the emails that i previously used
on the initial purchase. Would you know what may be causing that?

Anyway on my initial purchase it asked me to confirm my email, maybee that’s the reason why? However
the account is created and the user_meta is stored as expected. Its just not upgrading the account. But all the
vars and everything expected are there and validating, including the the same purchase email :(

What should have happen is the

paypal-return-in-subscr-modify-w-level.inc.php

Should have updated the account, and basiclly restored the options in the usermeta. But instead it
treated it like a new account, not sure why?

Anyway – Im shot. thanks for your help!!

Ricky

Posted: Thursday Jul 12th, 2012 at 2:31 am #18996

Hey Dude

Ok here is the method to my madness :D – I took notice of the custom= variable passed to
ClickBank – then funneled back into PAYPAL files, then i figured out that the only real use of
it was to verify $HTTP_HOST for validation

SO I used that to my advantage UUMMUUHHAAA

What I did was Hack this 2 files to accept the custom=
like $paypal[‘custom’]=domain.com|1 – where 1 = CB ITEM PURCHASED

paypal-notify-in.inc.php // validates custom domain.com | HACKED to validate domain.com|item#
paypal-return-in.inc.php // validates custom domain.com | HACKED to validate domain.com|item#

Then in these 4 files I updated it with some logic where

paypal-return-in-subscr-modify-w-level.inc.php // this will ADD TO s2member_custom USERMETA – IF EXISTS
paypal-return-in-subscr-or-wa-w-level.inc.php // this will ADD TO s2member_custom USERMETA – IF EXISTS
paypal-notify-in-subscr-modify-w-level.inc.php // this will ADD TO s2member_custom USERMETA – IF EXISTS
paypal-notify-in-subscr-or-wa-w-level.inc.php // this will ADD TO s2member_custom USERMETA – IF EXISTS

if(s2member_custom) Exists which would = domain.com|1
I did not overwrite it – I added to it like domain.com|1,2,3
etc where 1,2,3 would be the items purchased

Then in this files

paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php

which basically stores the EOT for WP_CRON processing, I hacked it to store the Item Number (1,2,3)
Being cancelled in a new user option (s2member_cancel_request)

Then in the actual EOT system file

auto-eots.inc.php

I hacked it to check the current s2member_custom (domain.com|1) against the s2member_cancel_request (1,2,3) etc..

Which will either override the default demotion setting to downgrade the level being canceled
from 2 to 1 based on the items logic OR to keep default demotion setting based on the item criteria we now have

//default demotion
$demotion_role = c_ws_plugin__s2member_option_forces::force_demotion_role(“subscriber”);

So im still testing this out, but in theory now its storing everything needed, to do these cross checks
and demote per item number that is happily stored in custom= and on a cancel request stored in happly stored in s2member_cancel_request option

BUT

Then I realized that this file does it in real time so I added the EOT logic
that would demote a user based on the cancellation Item sent

paypal-notify-in-subscr-or-rp-eots-w-level.inc.php

But now im thinking as i type this – that if this gets called directly, its not going to set the EOT data for WP_CRON
and its going to do EOT right there. So I cant rely on the (s2member_cancel_request) being stored
because it never really sets up for WP_CRON – unless im missing somthing here.. and if thats the case
then i can demote based on the custom= variable directly (as the custom var passed will have the item number thet are canceling – then the current s2member_custom in the DB will have the items they purchased as 1,2,3 etc..).

Now Im not sure how this file effects things so if you can share some insight, would be awesome if its even used
in ClickBank processing

So basiclly I figured out

clickbank-return-in.inc.php // THIS HANDLES IPN RETURN SOLELY FOR SALES & RECURRING
clickbank-notify-in.inc.php // THIS PIPES ALL IPN QUERIES TO PAYPAL NOTIFY

clickbank-button-in.inc.php
//This creates short code. However it hard codes the HTTPHOST attribute for some reason
//so I forced it not too, since i needed to pass the |1

Anyway Ive been hacking at this since 8PM and I think i have it.. i’m in the process of upgrading the test account to make sure I do have it :) But everything seems to be storing right as i coded it

I have 11 years dev experience, and this was a tuff one :)

Thanks!
Ricky

Posted: Thursday Jul 12th, 2012 at 1:33 am #18980

Sorry – for some reason my backup buddy on DEV did not add the auto increment to the wp_options table YUKKKK

Anyway I figured out how to hack it to do exactly what i needed for concurent subscriptions.. its
was pretty tuff to say the least and the naming conventions drive me nuts LOL

Ricky

Posted: Thursday Jul 12th, 2012 at 1:29 am #18977

Anyway found a BUG in your code

http://screencast.com/t/8gO56pvg

Basically its setting the transients in that line with an ID of 0
Which is making the registration process fail

This is somthing that i have not modified here

Ricky

Posted: Thursday Jul 12th, 2012 at 12:22 am #18976

never mind dude. I got it ;)

The only thing i have a question on now is

$user->set_role (“s2member_level” . $paypal[“level”]); /* (upgrade/downgrade) */

This needs to be prefixed – like s2member_level1 or s2member_level2

thanks

Posted: Wednesday Jul 11th, 2012 at 10:28 pm #18973

ok man i think i may have what i need here dude. I just need some clerfication – inside the

clickbank-notify-in.inc.php – in the PRO folder. If it gets the cancellation request – where is that notfication
funneled through next

paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php

or

paypal-notify-in-subscr-or-rp-eots-w-level.inc.php

My goal is to find exactly what they canceled since I already have hacked the custom = to equal

domain.com|CB ITEM

So when that CANCEL comes in – that custom= should already have the item being canceled
so basiclly I need to use that as an identifier to demote the user

so where are these stored – or what file passes this to the EOT ?

Please let me know.. im almost there i think :)

RIcky

Posted: Wednesday Jul 11th, 2012 at 10:11 pm #18971

OK dude.. forget all the crap on the top I asked.. not important. I figured out a way to hack
the custom= variable stored in the DB with the Clickbank Item number I need to determine
demotion. Now my question here is almost the same as above

say the stored IPN is LEVEL 1 and then they buy LEVEL 2 – is the stored
IPN varibles overwritten or added to in the DB?

Thanks!
Ricky

Viewing 25 replies - 1 through 25 (of 47 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.