Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore – Handling Multiple licenses
Tagged: ipn paypal, licensing
- This topic has 34 replies, 10 voices, and was last updated 6 years, 5 months ago by wzp.
-
AuthorPosts
-
August 28, 2013 at 10:56 pm #32104josh401MemberQuote:You can tell eStore to forward the IPN to your script by specifying it here:
WP eStore Settings -> 3rd Party Integration tab -> POST IPN to a 3rd Party Application
If a url is entered here.. and PayPal is selected as the payment method… does the IPN get sent both places?
It sounds like it is first received by eStore; and after being processed; is then passed to the 3rd party script?
I suppose what I am asking is… if I enter a url here to do further processing (like updating a database with license keys and email addresses after a successful purchase is made)… it won’t affect PayPal (and eStore) from doing it’s thing?
August 29, 2013 at 2:21 am #32105adminKeymasterYour assumption is correct. You can use that feature to get notified to a script and do some additional custom post payment processing work. That won’t affect estore’s standard operation.
August 29, 2013 at 9:03 am #32106josh401MemberFantastic!!
I want to develop a licensing system for this plugin – to sell licenses versions of electronic software. I’m going to try and keep the entire process contained within the WP environment; for consistency. You already have the option to send (and attach to IPN) a pre-generated license key.
My plan is as follows:
1. Use the option as discussed to post to a a custom script.
2. Grab the user email, transaction ID, and license key.
3. Custom script will update the database with the selected information.
4. Additional script will be written which will be placed inside WP plugin which is being sold; that will perform the check to the database.
Again.. I will most likely keep this within the WP environment for consistency and familiarity purposes.
Lastly, I’m sure a nice little admin panel where the owner can manage user accounts and transaction details would be nice
I’ll keep ya posted!!
August 29, 2013 at 11:26 pm #32107adminKeymasterSounds good.
August 29, 2013 at 11:42 pm #32108josh401MemberWell, you might be a step ahead of me.
I see all relevant info is stored in the
wp_eStore_customer_tbl
table (email, license key, trans id, etc.).However, I’d like to use the 3-rd party script (working beautifully, thank you) to process the info and store it into a new secure database; solely for handling licenses.
Everything is working nicely so far, except one thing:
1. I create the licenses for the product.
2. I am able to send it in the buyer email via {serial_key} tag.
Now, can I also pass this key to the PayPal IPN info? I don’t see it being added in the returned $_POST data.
Thank you, so much!
August 30, 2013 at 1:19 am #32109adminKeymasterWhy would you want to send this back to the POST data? The post data only contains info that it received from PayPal. you don’t need to add your custom data to it.
August 30, 2013 at 9:05 am #32110josh401MemberYou are absolutely right. My approach was all wrong.
I have a much clearer approach now.
One question:
Does each serial key get removed from the available pool of keys (in the options menu) once it has been used in a successful purchase?
August 30, 2013 at 11:16 pm #32111adminKeymasterYes, the serial key/number will get taken out of the product configuration after a successful transaction. Here is a reference to the documentation:
http://www.tipsandtricks-hq.com/ecommerce/how-to-use-the-seriallicense-key-code-selling-feature-1618
August 31, 2013 at 7:47 am #32112josh401MemberGot it. Thank you. I didn’t see it specifically mentioned in that post, so I figured I’d ask to make sure I didn’t break something along the way.
One last question, and I believe I’ll have a working version. Very exciting!!
The serial key which gets stored in the database gets preceded with the item name.
Thus, if a serial key of
001
gets pulled from the options; for a product namedProduct 1
; the valued stored in the db isProduct 1 - 001
.While this is a nice feature, I would prefer just storing the serial key that is entered into the options; without being preceded by the product name.
Is there a hook or filter? Or would it require direct edits to a core file? If so, which one please?
Again, Thank you!!
August 31, 2013 at 11:41 pm #32113adminKeymasterYou can always split the value on the “-” character and the 2nd argument will be your key code.
http://php.net/manual/en/function.explode.php
Is that something you can work with?
September 1, 2013 at 12:30 am #32114josh401MemberThanks again for your time with all this!
Well, I only found one program which generates keycodes. I’m looking to generate keycodes in batches of 1000. The program uses this format for keycodes
xxxx-xxxx-xxxx-xxxx
. So.. splitting at the hypen gives me a headache just thinking about it.Then… what if a user where to include hypens in their product name, like
My Product - Variant One
. This would create issues.I’m thinking it will be better to use the serial key in it’s entirety, and then
trim()
it’s whitespace. This will ensure the code is immune to variations.….. Making progress
September 1, 2013 at 12:33 am #32115adminKeymasterokay in that case you can modify the eStore code where it creates the key code. Look inside the “eStore_serial_key_functions.php” file. The “eStore_get_serial_key_for_product” function is what you need to look at.
If your script was a plugin then I could also add an action hook there.
September 1, 2013 at 12:39 am #32116josh401MemberGot it! Thank you! I will let you know as I near closer to that step.
I’m still going over in my head the best approach to plugin implementation. But, having an option to customize the database entry would certainly solve that issue.
I’ll post back soon!
July 12, 2014 at 2:13 pm #32117standfast999Membervery interested in this Josh401. Any progress?
June 5, 2018 at 8:20 pm #32118sentinel42MemberHello
I am wanting to license digital PDFs from estore to firms who can then, because they now have a license, distribute it to others, for example their members at no cost. If I simply use Serial key codes I assume the original buyer must enter the serial key to open the product…but what about those they distribute the same PDF to? (could be hundreds). Will they need the same serial key to open the PDF and if so would there be a limit to how often it could be used i.e. # of domains? Or does the # of domains only come into play using the license manager plugin to auto generate the license #?
Thanks for your help.
Doug
-
AuthorPosts
- You must be logged in to reply to this topic.