Home › Forums › Community Forum › BYPASS Thankyou Page Not Workign
This topic contains 57 replies, has 3 voices. Last updated by Cristián Lávaque 4 years, 5 months ago.
Page 2 Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Tuesday Jul 10th, 2012 at 5:43 pm #18837 | |
|
|
Hi Christian Thanks for the input here. It seems almost impossible by design to be able to achieve concurrent subscriptions without haveing to rewrite the core payment framework, which I dont have time to do. So this leaves me in a pickle here. If I have to move to WishList, which they say can do it, i have to undoo a shit Im a lead developer myself with 11 years experince. I understand work load, but in not asking for detailed 1) Clickbank Returns – THIS FILE I just need the flow and I may be able to come up with a patch. This issue is you have 2 sets of PayPal files I had wasted 6 hours yesterday going through the files… the naming conventions are hard to follow as I dont understand the core (I guess good Job Security LOL) Anyway – if I disable the EOT that means that the members will happily have access even on a cancellation. So i guess we can just do this manually then. (thats another thing) I dont see any clickbank EOT files. where is this in PayPal? I seems that everything is routed in PayPal. – So is this the s2members folder or the /pro/ folder paypal files then you have PDN and IPN retunrs… its just confusing really to be honest with you. Anyway so if i disable the EOT then a customer refunds I would have to manually adjust access. Now you mention a script? Can i write any EOT hacks there? Once thing I really dont get is th IPN storage – transets – why this is in the wp_options table makes no sense to me Anyway if you can give me some flow insights – hook work arounds im not aware of to hack functionality of Ricky |
|
Posted: Tuesday Jul 10th, 2012 at 9:06 pm #18851 | |
|
|
Yeah, I know what you mean. It took me a bit to get used it, I was used to a very different way of doing it. And I still don’t know everything about it, but when I know what I’m looking for, now I can usually find it. I use a lot my editor’s to search all files under a directory and subdirectories. So now that I think I understand better what you need, I’ll try to answer these: [hilite mono]s2member_pro_clickbank_return[/hilite] is handled by s2member-pro\includes\classes\gateways\clickbank\clickbank-return-in.inc.php There you’ll find a [hilite mono]wp_redirect[/hilite] to the s2Member’s PayPal processing with [hilite mono]s2member_paypal_return[/hilite] and [hilite mono]s2member_paypal_proxy_verification[/hilite]. You can read about it here: [hilite path]Dashboard -› s2Member® -› PayPal® Options -› PayPal® IPN Integration -> IPN w/ Proxy Key[/hilite] Here are some abbreviations you’ll come across:
[hilite mono]s2member_paypal_return[/hilite] is handled by s2member\includes\classes\paypal-return-in.inc.php Since you’re selling subscriptions, in that file you’ll see these two that will be of interest to you, and I added the files where those classes are: [hilite code]c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level::cp[/hilite] [hilite code]c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level::cp[/hilite] The “modify” one is for existing users that were logged in when they started the checkout. I found transients are set in those. Jason used http://codex.wordpress.org/Function_Reference/set_transient and I’m guessing he did it like that because he was trying to do everything sticking to WP’s ways as much as possible. The signup confirmation email corresponding to those I found sent from: Search for [hilite mono]signup_email[/hilite] in those. The registration part s2member\includes\classes\registrations.inc.php ClickBank notifications s2member-pro\includes\classes\gateways\clickbank\clickbank-notify-in.inc.php are important too, e.g. when payments fail and EOT is triggered. For EOT behavior, this file: s2member\includes\classes\auto-eots.inc.php Sorry I didn’t reply sooner, I spent some time searching the files and finding the things you were asking. I hope they help you! |
|
Posted: Wednesday Jul 11th, 2012 at 8:29 pm #18966 | |
|
|
Hey Christian Thanks for the informative and deatiled response. This should be what i need to try to patch and modify s2member\includes\classes\paypal-notify-in-subscr-or-wa-w-level.inc.php Files is what really handles the user subscriptions as far as upgrading and adding to user accounts Thanks again bro! |
|
Posted: Wednesday Jul 11th, 2012 at 9:06 pm #18969 | |
|
|
Hey Chris Few things 1) Can you tell me why this is needed in every class eval (‘foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;’); 2) In registrations.inc.php ms_validate_user_signup() Is this used to validate the transients ? Cause i see ms_ (multi site) and then non ms_ functions Thanks Bud |
|
Posted: Wednesday Jul 11th, 2012 at 9:43 pm #18970 | |
|
|
Hey Chris I found an important piece of code here if ($existing_role !== $demotion_role) /* Only if NOT the existing Role. */ Maybee if i can tell that EOT this script was processing I can tell how to demote the users role Since you only store 1 subscription and EOT. Then its basically going to demote the user to the s2 options demotion level no matter what The question i have here – is any of the IPN variables available at this point. this way i can tell if so then the question here is – say the stored IPN is LEVEL 1 and then they buy LEVEL 2 – is the stored I guess my answers will be in the subsciber modify file – im going to keep on digging. However one thing that And sorry to be a pain – but – I see alot of apply_filters() but when i search for the filter name like ws_plugin__s2member_user_access_role I cannot find function s2member_user_access_role() Anyway thanks again Ricky Thanks |
|
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 say the stored IPN is LEVEL 1 and then they buy LEVEL 2 – is the stored 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 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 where are these stored – or what file passes this to the EOT ? Please let me know.. im almost there i think :) 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: 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 This is somthing that i have not modified here Ricky |
|
Posted: Thursday Jul 12th, 2012 at 1:31 am #18978 | |
|
|
I’m glad it’s helped you make progress. :) About the EOT and what access to remove based on the subscription ended, well, s2Member doesn’t currently worry about what the subscription gives access to or not, since on demotion it just removes everything, ccaps and level, down to just Subscriber role. So in order to keep one subscription’s access and remove the other, you’ll need to add somewhere, what access each of your subscriptions gives. If you use your CB item number to match a ccap used for access, then it’d be simple. E.g. CB item 1 gives ccap 1, then it’s simple to remove the access. But if you have a more complex access setup, then you’ll need to have it defined somewhere in order to know what access to remove from the user’s account on EOT. You could also match it to a level number, but then you’d have to modify the s2Member Level roles, since they give incremental access, e.g. Level 2 also gives access to Level 1 content. To remove the incremental access, you’d have to edit Level 2 to remove the WP capability [hilite mono]access_s2member_level1[/hilite]. http://wordpress.org/extend/plugins/user-role-editor/ If you edit the roles, you’ll want to lock them so they aren’t reset on update. Knowledge Base » Locking s2Member Roles/Capabilities To remove the particular role or ccaps in your custom demotions, this may be helpful: Knowledge Base » Changing Roles/Capabilities via PHP About ccaps, they’re actually WP capabilities given to a specific user, not to a role. In the s2Member interface they’d just be the string you give them, but in reality the have the prefix [hilite mono]access_s2member_ccap_[/hilite], so keep that in mind when you work with them.
That line is before the action hooks. It prepares all the vars available at that point of the script, to pass them in the action hook, so they’re available to your hack if you need them.
You won’t use that ms_ method. From the documentation right above the method:
I hope it helps! |
|
Posted: Thursday Jul 12th, 2012 at 1:33 am #18979 | |
|
|
Just noticed the posts you made while I was writing mine. I’ll reply to those in a sec. |
|
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 Ricky |
|
Posted: Thursday Jul 12th, 2012 at 1:42 am #18981 | |
|
|
lol yeah, it has a curve, but you’ve done great so far. I gave you the “Advanced” user badge. :) Thanks for the update on what you reported as a bug earlier, glad you found what was causing it for you. About your level role question, I think I had already answered it in my previous post without knowing you’d ask.
So you did it? Nice job!! :D What was your solution in the end? By the way, if you had to modify the s2Member files instead of using hooks, I recommend that you move those files to the must-use plugins folder (wp-content/mu-plugins) so they aren’t overwritting when you update s2Member. |
|
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 SO I used that to my advantage UUMMUUHHAAA What I did was Hack this 2 files to accept the custom= paypal-notify-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 if(s2member_custom) Exists which would = domain.com|1 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) 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 //default demotion So im still testing this out, but in theory now its storing everything needed, to do these cross checks BUT Then I realized that this file does it in real time so I added the EOT logic 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 Now Im not sure how this file effects things so if you can share some insight, would be awesome if its even used So basiclly I figured out clickbank-return-in.inc.php // THIS HANDLES IPN RETURN SOLELY FOR SALES & RECURRING clickbank-button-in.inc.php 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! |
|
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 Anyway on my initial purchase it asked me to confirm my email, maybee that’s the reason why? However 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 Anyway – Im shot. thanks for your help!! Ricky |
|
Posted: Thursday Jul 12th, 2012 at 5:00 am #19003 | |
|
|
The pipe separated values in the custom attribute are already supported by s2Member, called custom values. You can add them to your custom attribute in the shortcode for the button. You can read abou them in the attribute descriptions. [hilite path]Dashboard -› s2Member® -› ClickBank® Buttons -› Shortcode Attributes[/hilite] Keep them in mind so your implementation doesn’t conflict with some part of s2Member. These are mostly available for use in the Notifications and Tracking APIs, as well as the New User and Signup Confirmation emails. I’m not sure if they’re already stored in the database, you may want to check that. Ah, regarding selling the access using levels, I’m sorry I mentioned it earlier as a possibility, I now realized it isn’t for you. The thing is that you want to add access through the second subscription, so levels may not be what you want if the extra access isn’t supposed to build on top of the access from the first subscription. If these subscriptions are independent, you really want to use ccaps.
About s2Member assuming it’s a new account when you purchased the 2nd subscription, were you logged in? If you are logged out, s2Member will take the new purchase as meant for a new account. You have to be logged in to your account when you click the CB button, if you want to upgrade your account. And you have to use the button generated with the s2Member shortcode for it, since it includes some dynamic information that would be missing in a regular CB button.
Are you using BuddyPress, which asks for account activation, or talking about an email list double opt-in confirmation? s2Member doesn’t require you to confirm your email address. You can login right away without checking your email, unless you disabled custom passwords and the user needs to get the password from the New User email WP sends him. |
|
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 2) ccaps What are these and How do I use them in my implimentation above. The goal of 1) pipe ITEM# in custom 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 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 So with that being said.. is there a way to create the registration somewhere so that when UPSELL LEVEL2 Thanks |
|
Posted: Thursday Jul 12th, 2012 at 5:40 pm #19080 | |
|
|
Sorry, since you were talking about the piped values, I thought you knew about them, so I didn’t think of mentioning it earlier. The whole string for the custom attribute gets saved in usermeta, including the piped values. Look here: [hilite path]Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants -> S2MEMBER_CURRENT_USER_CUSTOM[/hilite]
But that constant may not be available right when the user returns from ClickBank. It most probably will be available in the s2 Vars, though. [hilite path]Dashboard -› s2Member® -› ClickBank® Buttons -› s2 Vars (Explained)[/hilite] Now, I haven’t checked if the custom attribute is sent by CB with each notification afterwards, like with the recurring payments or cancellations/refunds, you’ll need to test this. If it doesn’t, you’ll need to save in usermeta the CB transaction/subscr ID, whatever CB identifies the subscription with in its IPNs, and include the item’s number. Knowing the item number you’ll be able to remove that level/ccap when the user cancels/refunds.
This video explains them quite well: You will still want to read the documentation for them here: That said, now that I saw your upsell path, I realize these are not subscriptions that you’d sell independently. One would be an upsell to the first one, so Levels will work fine for access, since it’s incremental too. Unless you plan to sell Level 2 without requiring Level 1, then you’ll need to separate them with ccaps.
The funnel I’d try would be: Level 1 -> CB checkout -> Registration -> Auto login -> Upsell Level 2 -> CB checkout For the auto-login after registration I have a hack you can try: wp-content/mu-plugins/s2hacks.php Then you can set the first login to redirect the person to your upsell sales page. [hilite path]Dashboard -› s2Member® -› General Options -› One-Time Offers (Upon Login)[/hilite]
Right, it wasn’t. It started over 2 years ago as a simple plugin to restrict certain things and sell access to them through PayPal, but Jason is not a marketer. Since it was good, it became very popular and with feature requests, Jason kept expanding what it does, but always limited by what the original framework permits. Year and a half ago I started working with him and I do have a marketing background, and being in charge of support I’ve dealt with what users have trouble with. So about a year ago we started talking about a rewrite of s2Member, and about 6 months ago he started working on it, the last 4 months almost exclusively on it. The new version takes care of most of the known limitations s2Member has, permits to do what most users have requested, and opens up some possibilities that no one has even asked for yet. It won’t be perfect and we’ll still be improving it, but it’ll be a quantum leap from what it now is, and it already is quite decent even with it’s current limitations. |
|
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 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? Also After the second checkout what happens when it realizes they are logged in 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 Ok so the way I have it now is basically hacking the custom to always carry the vars I need. I will watch the 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 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 Anyway have a look at my above post when you get the chance :) Thanks again! |
|
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:38 pm #19095 | |
|
|
Yes, you can do that. That’s actually how I had it before the last revision, but I had to change it to that so that the Login OTO redirections worked.
The second checkout will happen with the user already registered and logged in, so the hack won’t apply there. To send the person to a specific page after checkout, you’d use the URL for the Thank-you page for that product in ClickBank. [hilite path]Dashboard -› s2Member® -› ClickBank® Options -› Thank-You Page Integration[/hilite]
I don’t know how to disable that. You’ll need to ask the BP guys that question. :/
Thanks for the kudos! I’m glad I can help you, although many parts weren’t something I was familiar with. I know how it’s been for me when I needed to customize something and got help or not.
Yeah, I know what you mean. I started to learn PHP about 11 years ago myself. Was part of the SMF open source project for years. Then I did some real estate business, and studied internet marketing some years, and when I wanted to create a membership site and studied the options, found s2Member and ended up joining the project. :) |
|
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! Buddy Press is forcing the email activation. I think thi is screwing up the flow, any thoughts on that? Thanks |
|
Posted: Thursday Jul 12th, 2012 at 8:51 pm #19097 | |
|
|
Oh and awesome man! 11 Years GPL BABY LOL – :) RIcky |
|
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/
|
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.