Home › Forums › Community Forum › Pub Post X days for X $$ then make Pending
This topic contains 8 replies, has 3 voices. Last updated by Cristián Lávaque 3 years, 9 months ago.
Topic Author | Topic |
---|---|
Posted: Thursday Mar 28th, 2013 at 7:44 pm #46009 | |
|
|
Fantastic Documentation!! Great Videos… but I still can’t figure out the best way to handle this situation. I want to collect X dollars per day, and have that translate into how long a Post that belongs to that transaction stays actively Published. A single member might purchase several of these “non-recurring” posts. Example: Case in point… Think Video Classified ads… where we collect $10 for 10 days for example. I really would love a way that when that expiration date happens the post goes from Published to Pending Review. Now, I know that’s kind of backward but boy would that work great for us! Examined the Buttons to see if maybe I could make 30 of them, each with their own price… wouldn’t object to something like that if that’s the best way to do it… unless there is a “calculation” way to do it, or a “table way” to do this… I just don’t know which the best way to go — or even — what is even possible with S2 Pro. We have a PayPal Pro with Payflow recurring charges account — fyi. We have Memberships for businesses and I’ll post a different ticket on my ideas on that (not as complicated as this one) so I really could use a push in the proper direction. Those businesses will just do monthly recurring renewals — I already see how easy you made it to accomplish that… it’s these One Up transactions, and multiple One Up’s for a single member that has me spooked. The site already has all the PayPal interoperability — have that worked out… but I can’t see the best way to handle the above nice and neatly. What are your thoughts on that problem? |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Friday Mar 29th, 2013 at 4:56 pm #46090 | |
![]() |
|
Thank you for your inquiry. We appreciate your patience. :-)And thank-you for the kudos! I believe the only way to accomplish what you’re looking for here would be to set up API Notifications. You can have Users sign up for whatever you decide, and have your API Notification handler handle your Post’s changes. You can find all the information about s2Member a developer will need to set this up here: Knowledge Base » Building An API Notification Handler I’d recommend using the Payment Notifications, and EOT Notifications. You’d want to create/publish your Post when you receive your payment, and change it to “Pending Review” on EOT Notificiation.
If you need assistance, we recommend http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
|
|
Posted: Friday Mar 29th, 2013 at 5:09 pm #46093 | |
|
|
Hi Bruce, |
|
Posted: Friday Mar 29th, 2013 at 5:14 pm #46096 | |
![]() |
|
Right. You’d make a Button / Pro Form that generates an amount of time that the ad should show up. When the time that they paid for it up, an EOT Notification will be generated and your process will run. |
|
Posted: Friday Mar 29th, 2013 at 5:19 pm #46098 | |
|
|
Excellent… thanks Bruce… will give it a spin! |
|
Posted: Friday Mar 29th, 2013 at 9:35 pm #46116 | |
|
|
Wow, my brain is on FIRE… And that’s a good thing… but I need verification that I didn’t just burn it out. I’m going to add a tad more than I normally would… I’ll number my assumptions for ease of reference: 1) When my Level Zero Visitor — joins they get a Member ID and/or does a “transaction upgrades” to Level One. 2) When the transaction processes as Paid, an unique PayPal Transaction ID is created for that Transaction 3) Guessing that that TransID gets stored in the Database — but that’s my first question, does it? (yes/no?) 4) If it does not, I’ll want a s2_payment_notification API to get the info and store it — (yes/no?) 5) When I S2member Browse Users, I’ll see their Paid Subscr. ID (pretty sure that’s correct) 6) If they have more than one transaction, I’ll be able to open Transactions to see the TransID (yes/no?) 7) If I run a s2_payment_notification API… all the Custom ID’s returned from PayPal will be viewable inside of the S2member Browse Users screen (yes/no?) 8) If that same MemberID, is given the Role of Contributor — they will be authorized to Post yes/no? (seems so) 9) That Post always has an unique ‘tag_id=xxxxx’ and that number is also associated with this member. 10) In S2member’s Transaction History… I want to ADD that ‘tag_id=xxxx’ to that single paid transaction manually so the other items retrieved by the s2_payment_notification API and stored — so that I know when the expiration date of the transaction is — associated with that particular Post — are all related. “Payment” = “Post stays up for that length of time” (but I’ll need to create a script to do that housekeeping) 11) That Housekeeping Script (Cron Run Daily) will look at the expiration date, add a day of grace, then flip “Published” to “Pending Review” making the Post “invisible again”… while still retaining the post — which allows the possibility of renewing that post with new payment. 12) Regarding a new payment, that new TransID will be associated with the Member and just like in step 10, we would just add that unique ‘tag_id=xxxx’ to that new single paid transaction manually, set the Post to Published and we are good to go… 13) I see the lines (42-50) in s2_payment_notification API that: Gets auto_eot_time, 14) I’m guessing that S2member passes $user_id to PayPal and that is why the s2_payment_notification API is actually able to return the information. (yes/no?) HERE is where the biggest questions are — now that you get where I’m going with all this: 15) If I had the member create the Post first, I would have the ‘tag_id=xxxx’ available for possible use. (yes/no?) 16) If I then had the member pay with a custom button for X days, can the ‘tag_id=xxxx” be passed THROUGH to PayPal, so that when the s2_payment_notification API — RETURNS the standard and optional values… everything would already be in place for the Housekeeping Script — which would remove the manual step from the process. (yes/no?) So here’s the deal… I have a great friend that is a PHP guy… and I make a hell of a Camtasia Training Video on a real regular basis… so I’m not going to be a huge load on your support efforts. But if you’ll take the time to help identify any steps that I’ve left out… or suggestions for a better way to do this… My friend and I will make you a “knock your socks off” training video that really shows a Newbie how to navigate these waters. Thanks in Advance… your example Payment Notification API was a huge help already!!! |
|
Posted: Sunday Mar 31st, 2013 at 6:36 pm #46217 | |
|
|
Hi Robert. Bruce hasn’t gotten back to this thread yet, but I’ll try to reply some of your questions and will leave the rest for him. :)
No, the subscr. ID is in the user’s profile. The trans. ID will be in the s2Member logs, if you have them enabled, but these are only for debugging.
Yes. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications -> %%txn_id%%[/hilite]
Yes. By the way, it’s not s2Member’s Users screen, it’s the regular WP Users one but s2Member has a shortcut to it in its menu. [hilite path]WP Admin -> Users[/hilite]
s2Member doesn’t have this, it’ll either be in the customization you create or in the payment gateway.
No, the notification will either load a URL or send an email. With that you can then store the data and customize the users list to display it.
I guess, I’m not familiar with that role, but the name suggests that. You need to review the capabilities the role has, or just give that role to a test account, login with it and see if it does. http://wordpress.org/extend/plugins/user-role-editor/
No, posts are not associated to users in WP other than the author, unless you’re talking about a customization you’d create for this?
s2Member doesn’t have a transaction history. You could create one with the Payment Notification and a custom script, though.
When the user is logged in at the time he loads the page with the pro-form, the pro-form will include the user’s ID so s2Member knows to upgrade that account after checkout. |
|
Posted: Monday Apr 1st, 2013 at 12:54 pm #46281 | |
|
|
Wonderful Reply Cristian! OK, so I’m thinking I’m getting close to a spec, that I can hand over to someone to handle the chunk(s) that will need to be built… but with your excellent knowledge of S2Member, I have to know what’s even possible so that I can start my contractor in a “doable direction”. Please be on the “lookout” for that “what the hell stuff — we can’t do that”… because my impression in going through the documentation and watching the videos… is leading me to believe that all my steps below can be reasonably easily accomplished with some effort… that nothing I’ve put as a step… is a modification crusher, causing a complete rethink of the way to process these “automatically date sensitive, auto expiring Paid Posts”. To review and clarify… old stuff is not bold, new stuff — is… 9) That Post always has an unique ‘tag_id=xxxxx’ and that number is also associated with this member. No, posts are not associated to users in WP, unless you’re talking about a customization you’d create for this? ‘tag_id=xxxxx’ is associated with the user… I’ve dug into this… and when I go to the member user history, it shows all the posts that are associated with that member, when I click on the “number of posts” it expands and shows all posts… so the question #10 “seems” like it would be possible… see below. 10) In S2member’s Transaction History… I want to ADD that ‘tag_id=xxxx’ to that single paid transaction in the transaction flow — passed along so the other items retrieved by the s2_payment_notification API and stored — so that I know when the expiration date of the transaction is — associated with that particular Post — are all related. “Payment” = “Post stays up for that length of time” (but I’ll need to create a script to do that housekeeping) s2Member doesn’t have a transaction history. You could create one with the Payment Notification and a custom script, though.
14) I’m guessing that S2member passes $user_id to PayPal and that is why the s2_payment_notification API is actually able to return the information. (yes/no?) When the user is logged in at the time he loads the page with the pro-form, the pro-form will include the user’s ID so s2Member knows to upgrade that account after checkout.
Again, your insight and suggestions are truly appreciated — feel free to intersperse per each line as before… that worked really well !! The Summary for my contractor: 1) As the Member — registers — WordPress will automatically assign a standard WP Role. 2) Registered Members — are assigned Author Role and when they create a Post — they are still a S2 Level 0 3) The Member finishes the post and then S2Member prompts for payment for that Post 4) The Post/S2 contains a way to select from dedicated buttons (3 days, 5 days, 10 days, 20 days, etc…) 5) Member selects from Payment Options, Pays and becomes a S2 Level 1 6) The Transfer of information to PayPal includes the usual information but ALSO includes the Post_ID# 7) PayPal hangs onto the Custom Field passed to them — that field being the Post_ID# 8) When the s2_payment_notification API gets information from PayPal, the MemberID, it includes the Custom Field Post_ID# and the normal EOT Notificiation information typically returned. 9) Whether the s2_payment_notification API needs to write to the MySQL database, or to a new text file… it seems like the “actionable set” of data… the critical ones being just the date that the “post needs to change from Published to Pending Review” and the “Post_ID#” will be available for a script to act upon. 10) That script, reads the Text File or scans the MySQL database, and updates the Published Status of every Post that has the expired date in the records. 11) If the Member decides to extend the Post by paying again, with their Role as Author, they would be able to edit the Post and “repay” by changing anything in the Post at all. 12) When the Post Publishes — just like in Step #3 happens again — S2Member would prompt for payment again… so this would indicate that the Transaction_ID# from PayPal, would change to be able to track this “new transaction”. 13) Unless it’s better handled by S2Member, to Update that original charge — which is beyond my understanding of the interoperability between S2Member and PayPal Pro with Recurring Charges Account. I’m trying hard to define this accurately for the best result and think this is going to be an excellent feature for future S2Member Pro users… Thanks again for your thoughts and the time taken to think this through with me!! R |
|
Posted: Thursday Apr 4th, 2013 at 5:26 am #46570 | |
|
|
You’re right if he’s the author. When I replied I had not understood that was the case, sorry.
the s2Member Level is also a role, so he’ll either be Level 0 or Author, can’t be two roles. Instead of the Author role, what you could try is give him the capabilities that’d make him an author but his role would be Level 0. Knowledge Base » Changing Roles/Capabilities via PHP Or, if all level 0 users will be able to post, then edit the level 0 role to include the capabilities that make him an author. Remember that those capabilities will give him access to areas of the admin side, so make sure you test what he gets and hack accordingly to manage that access correctly.
You can use the custom values. [hilite path]Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes -> custom[/hilite] Or, probably better, a custom capability. Video » s2Member (Custom Capabilities) |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.