giganut 109 Posted October 18, 2014 Report Share Posted October 18, 2014 This software is completely free and open source, you can add what you like and hopefully you will share it back for everyone to use. This software is a cross API integration for the popular Easy Digital Downloads Wordpress plugin and the great Ubot Locker licensing system by meter..The software will monitor your Easy Digital Downloads stores API for new sales, when a new sale is made the software is triggered to automatically issue the client a license for your software and email the client the license keys through the locker API. This software is still in beta, make sure to follow the direction in the video before running the software. Please take note that this is not a 100% complete solution, but does the job. Edit: To make the software work correctly it's recommend that your store product is the same name as the project you have in your ubot locker licensing system, for example: if your product is called Facebook shares, then your project in the licensing system should also be called Facebook shares or the software will not work correctly. Edit: It's recommended to turn the software off when updating your wordpress instillation or updating plug ins in your wordpress site. I would like to thank, LoWrIdErTJ - BotGuru for helping me on the wordpress end of things, LazyBotter for making this possible with the ubot locker API, and Dan for sharing the knowledge to make this bot through his ubot HTTP plugin tutorials This software has been made with Ubot v 4 and was tested and compiled with v 4, compatibility with 5.5.1 is unknown. To run tests on your Easy Digital Downloads store it's recommend to use this paid plugin called manual purchase. Here is the link https://easydigitaldownloads.com/extensions/manual-purchases/ that way you can test the api live without having to wait for sales. https://www.youtube.com/watch?v=7LS3r2Idai8 Ubot Locker API Reference http://www.ubotstudio.com/forum/index.php?/topic/16837-free-ubot-locker-api-to-manage-licenses-iphone-app-out-now/ Easy Digital Downloads API Reference https://easydigitaldownloads.com/docs/edd-api-reference/ Download Link : https://www.mediafire.com/?plls7a16wsuij2e Plugins used in the software: HTTP POST plugin (Required)Ubot XML plugin (Required) Ini File Reader Plugin (Not Required)TinyMCE Integration PlugIn (Not Required)Bulk reset plugin (Not Required) Source Code: Tab One comment("This software will integrate the popular shopping cart Easy Digital Downloads with the Ubot Locker licensing system. The software will monitor your Easy Digital Downloads store shopping carts API for new sales, when I new sale has been made the software will automatically issue the client a software license through the Ubot Locker API and mail the license to your new client. Many thanks to \"LazyBotter\" for making the Ubot Locker API. Locker API Path: = http://yoursite/ubotlocker/api.php EDD API Path: = https://yoursite.com/edd-api No trailing forward slash / for the above paths. Ubot Locker API Reference: http://www.ubotstudio.com/forum/index.php?/topic/16837-free-ubot-locker-api-to-manage -licenses-iphone-app-out-now/ Easy Digital Downloads API Reference: https://easydigitaldownloads.com/docs/edd-api-reference/") reset_and_clear() ui text box("Locker Username:", #locker_username) ui text box("Locker Password:", #locker_password) ui button("Save Credentials") { save_settings() } ui text box("EDD Public Key:", #edd_api_key) ui text box("EDD API Token:", #edd_api_token) ui button("Load Credentials") { load_settings() } ui text box("Locker API Path:", #locker_api_url) comment("This set & $find regular expression below will test to make Sure the correct path has been entered for the text box \"Locker API Path:\" if the access point has an error The if statement will alter the user of the error.") set(#locker_path_test, $find regular expression(#locker_api_url, "\\/api.php"), "Global") if($comparison(#locker_path_test, "!=", "/api.php")) { then { in new browser { thread { alert("There is a problem with your Locker API Path: the access Point should be http://yoursite/ubotlocker/api.php your path could very from this path depending on the location You placed the lockers folder during installation. The best way to find the exact path is to use an FTP client and copy the URL location. FileZilla Allows you to do this.") } } } } ui text box("EDD API Path:", #edd_api_url) comment("This set and $find regular expression will test the text box EDD API Path for the correct path format and then through An error if the path is incorrect.") set(#edd_path_test, $find regular expression(#edd_api_url, "\\/edd-api"), "Global") if($comparison(#edd_path_test, "!=", "/edd-api")) { then { in new browser { thread { alert("There is a problem with your EDD API Path the path it Should be entered like so https://yoursite.com/edd-api With no trailing slash at the end. If your site uses HTTPS Make sure to use https or if your site does not have a SSL Cert. then use http at the beginning of our URL") } } } } ui stat monitor("api calls :", #num_api_calls) ui stat monitor("<br />", "") ui text box("Request Timeout:", #request_timeout) ui text box("Request Referer:", #request_referer) ui stat monitor("Total Sent Keys:", #sent_keys_tracker) ui text box("Request Proxy:", #request_proxy) ui text box("Wait Between Requests", #wait_request) ui stat monitor("Keys Not Sent ::", #failed_keys_sent) plugin command("Variablemulti.dll", "Bulk Variable Set", 0, "#num_api_calls #sent_keys_tracker #failed_keys_sent") loop while($comparison(#infinite_loop, "=", 0)) { reset_and_clear() comment("The get request below sends a get request to Your ubot locker server and request a new API Key, so it can be used to authenticate requests") set(#request_locker_key, $plugin function("HTTP post.dll", "$http get", "{#locker_api_url}?user={#locker_username}&pass={#locker_password}", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("This if statement below will through and error if you have entered a incorrect Locker Username or Locker Password.") if($comparison(#request_locker_key, "=", "\{\"success\":\"false\",\"error\":\"Invalid Username Or Password\"\}")) { then { in new browser { thread { alert("The remote server returned an error: \{\"success\":\"false\",\"error\":\"Invalid Username Or Password\"\} check your Locker Username or Locker Password of errors") } } stop script } } comment("This find regular expression command extracts The returned API key to a variable from the above JSON response received from your locker server.") set(#locker_api_key, $find regular expression(#request_locker_key, "(?!:\")[0-9a-z]+(?=\"\})"), "Global") comment("This get request will request the current sales stats for Your EDD store, the response will be returned in XML.") set(#request_store_sales, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/stats/?key={#edd_api_key}&token={#edd_api_token}&type=sales&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("The if statement below will through and error if your EDD EDD Public Key OR EDD API Token has an error or is an invalid key or token.") if($comparison(#request_store_sales, "=", "The remote server returned an error: (401) Unauthorized.")) { then { in new browser { thread { alert("The remote server returned an error: (401) Unauthorized. Please make sure your EDD Public Key & EDD API Token Are correct and active on your EDD store.") } } stop script } } comment("This find regular expression command will extract The total number of sales from the XML response Above, and save it to a variable called total_sales.") set(#total_sales, $find regular expression(#request_store_sales, "(?!<totals>)[0-9]+(?=<\\/totals>)"), "Global") comment("This set command will save the total_sales sum to a New variable called monitor_new_sales. This variable Will be used to test new responses against to see if any new store sales have occurred while leaving the Original total_sales sum intact with no changes.") set(#monitor_new_sales, #total_sales, "Global") comment("This loop while command below will loop while the variable Monitor_new_sales and total_sales are the same value. The loop is your new sales monitor. Inside the loop there is a get get request that will continuously request the sales for your EDD store, when a new sale is made the value of the variable Monitor_new_sales will change, this is what triggers the loop To stop looping and allow the code below it to run.") loop while($comparison(#monitor_new_sales, "=", #total_sales)) { comment("This get request will request the current sales stats for Your EDD store, the response will be returned in XML.") set(#request_new_sales, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/stats/?key={#edd_api_key}&token={#edd_api_token}&type=sales&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("This find regular expression command will extract the Current sales from your EDD store and save it to the variable called monitor_new_sales. If the sum returned is different from the total_sales sum this loop will stop.") set(#monitor_new_sales, $find regular expression(#request_new_sales, "(?!<totals>)[0-9]+(?=<\\/totals>)"), "Global") increment(#num_api_calls) comment("This If and loop while command, in the event that your site becomes unavailable and returns a blank request for The get request #request_new_sales will take over the loop monitoring for new sales, this loop will loop until your site comes back online and returns a full result into The variable #request_new_sales, this way your software will not be stopped by the trap below. I added the variable #monitor_new_sales to the condition to increase reliability") if($comparison(#request_new_sales, "=", "The operation has timed out")) { then { loop while($comparison(#request_new_sales, "=", "The operation has timed out")) { set(#request_new_sales, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/stats/?key={#edd_api_key}&token={#edd_api_token}&type=sales&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") set(#monitor_new_sales, $find regular expression(#request_new_sales, "(?!<totals>)[0-9]+(?=<\\/totals>)"), "Global") increment(#num_api_calls) plugin command("Open.Framework.dll", "Open Wait in Miliseconds", 20) } } } comment("This if and loop while will run in the event that the variable #monitor_new_sales is blank") if($comparison(#monitor_new_sales, "=", "")) { then { loop while($comparison(#monitor_new_sales, "=", "")) { set(#request_new_sales, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/stats/?key={#edd_api_key}&token={#edd_api_token}&type=sales&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") set(#monitor_new_sales, $find regular expression(#request_new_sales, "(?!<totals>)[0-9]+(?=<\\/totals>)"), "Global") increment(#num_api_calls) plugin command("Open.Framework.dll", "Open Wait in Miliseconds", 20) } } } comment("This if and wait command will alow you to change the speed that your EDD api is called. The wait works in seconds.") if($comparison(#wait_request, "!=", "")) { then { wait(#wait_request) } } } comment("This is a fail safe trap, if any of the two variables in the comparison are blank, the the bot will be stopped to prevent the software from running out of control. This Could be triggered if your site is not responding or your Site has went down for a moment longer than you have Set for the request timeout.") if($comparison(#request_new_sales, "=", "The operation has timed out")) { then { in new browser { thread { alert("The connection has timed out.") } } stop script } } comment("This set command will run after the above loop has been Triggered to stop by a new sale made through your store. The set will now set the vale of the new sales sum to the total_sales variable so the above loop will run again until a new sale has been made again.") set(#total_sales, #monitor_new_sales, "Global") comment("This get request will request the last client you have had Purchase product through your EDD store. We will Need the results to get the requested client info. Returned in XML.") set(#last_client, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/sales/?key={#edd_api_key}&token={#edd_api_token}&number=1&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("This if and loop while is a security measure that is in place For the event of your sites EDD API stops responding or your site has become unavailable for a short time due to unexpected down time. Here is what it will do, if the above Get request returns a blank request, the code below will loop until it receive a valid response from the server.") if($comparison(#last_client, "=", "The operation has timed out")) { then { loop while($comparison(#last_client, "=", "The operation has timed out")) { set(#last_client, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/sales/?key={#edd_api_key}&token={#edd_api_token}&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") plugin command("Open.Framework.dll", "Open Wait in Miliseconds", 20) } } } comment("This add list to list command will add the XML response To a list, by doing this it will make it much more simple to Get the right information for the new client.") add list to list(%xml_to_list, $list from text(#last_client, $new line), "Delete", "Global") comment("This find regular expression command will extract the New clients email from a specific point in the list. Then Add the email to a list") set(#client_email, $find regular expression($list item(%xml_to_list, 12), "([\\w-\\.]+)@((?:[\\w]+\\.)+)([a-zA-Z]\{2,4\})"), "Global") add list to list(%locker_info_emial, $list from text(#client_email, $new line), "Delete", "Global") comment("This command will extract the purchased product, the Product name should also be the same as the project Name that you have in ubot locker. Then adding it to A list for the locker") set(#product_project, $find regular expression($list item(%xml_to_list, 16), "(?!<name>)[a-zA-Z0-9\\s]+(?=<\\/name>)"), "Global") comment("If the client has purchased more that one product This list will have more than one item in it. The loop Below this command will add the items to the list.") add list to list(%locker_info_project, $list from text(#product_project, $new line), "Delete", "Global") comment("These three if statements are for when a client purchases More than one item in the same checkout. Aka added to cart, the if statements below will test the list items from the %locker_info_project to see if there is more than one item. This will loop the number you have set for UI setting called \"No. EDD Store Products\"") set(#xml_to_list_pos, 20, "Global") loop($list total(%xml_to_list)) { if($contains($list item(%xml_to_list, #xml_to_list_pos), "<name>")) { then { set(#product_project, $find regular expression($list item(%xml_to_list, #xml_to_list_pos), "(?!<name>)[a-zA-Z0-9\\s]+(?=<\\/name>)"), "Global") comment("If the client has purchased more that one product This list will have more than one item in it. This loop Will add them to the list.") add list to list(%locker_info_project, $list from text(#product_project, $new line), "Delete", "Global") } } increment(#xml_to_list_pos) } comment("This set command is setting the customers email to a variable called specific_customer_email to be used In the next get request.") set(#specific_customer_emial, $list item(%locker_info_emial, 0), "Global") comment("This get request will request the specific clients information About the new sale, the get request uses the extracted email To find the customer. This is required to find the clients full First and last name.") set(#specific_customer, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/customers/?key={#edd_api_key}&token={#edd_api_token}&customer={#specific_customer_emial}&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("This if and loop while is a security measure that is in place For the event of your sites EDD API stops responding or your site has become unavailable for a short time due to unexpected down time. Here is what it will do, if the above Get request returns a blank request, the code below will loop until it receive a valid response from the server.") if($comparison(#specific_customer, "=", "The operation has timed out")) { then { loop while($comparison(#specific_customer, "=", "The operation has timed out")) { set(#specific_customer, $plugin function("HTTP post.dll", "$http get", "{#edd_api_url}/customers/?key={#edd_api_key}&token={#edd_api_token}&customer={#specific_customer_emial}&format=xml", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") plugin command("Open.Framework.dll", "Open Wait in Miliseconds", 20) } } } comment("These two commands below extract the first and the Last name from the XML response for the customer.") set(#first_name, $find regular expression(#specific_customer, "(?!<first_name>)[A-Za-z0-9]+(?=<\\/first_name>)"), "Global") set(#last_name, $find regular expression(#specific_customer, "(?!<last_name>)[A-Za-z0-9]+(?=<\\/last_name>)"), "Global") comment("This set command combines the first and the last name Into one variable to make it easier to pass to the locker.") set(#first_and_last_name, "{#first_name} {#last_name}", "Global") comment("At this point the software should have the First and last name The products purchased by the client and the client email, this Is all the information that the software need to issue the clients Software licenses through the ubot lockers API. In case the client Has purchased multiple products under the same checkout. I will place a list total loop, if the client purchased more than one Item the list called \"%locker_info_project\" will have more than one Item in the list, so I will loop that list total and only increment that List position to add multiple licenses for different products for the Same client.") set(#project_info_Pos, 0, "Global") set list position(%locker_info_project, #project_info_Pos) if($comparison($list item(%locker_info_emial, 0), "!=", $nothing) OR $comparison($list item(%locker_info_project, 0), "!=", $nothing) OR $comparison(#first_and_last_name, "!=", $nothing)) { then { loop($list total(%locker_info_project)) { set(#email_key, $nothing, "Global") comment("The next three commands below will clear data When the loop runs more than one time, to make Sure that the right license key is sent to the client.") clear list(%ids) set(#return_table, $nothing, "Global") set(#Json_to_xml, $nothing, "Global") comment("This command sets the variable #project to the value Of the project list item, this will increment if the list has More than one item in it so you can add more than one Key to the ubot locker.") set(#project, $list item(%locker_info_project, #project_info_Pos), "Global") comment("This get request adds the license to the ubot locker for The clients new product.") set(#add_license, $plugin function("HTTP post.dll", "$http get", "{#locker_api_url}?api_key={#locker_api_key}&new_license_name={#first_and_last_name}&new_license_email={#specific_customer_emial}&new_license_project={#project}", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("This get request returns the license table, we will need the table to retrieve the license ID number so we can then email The clients new license keys to them.") set(#return_table, $plugin function("HTTP post.dll", "$http get", "{#locker_api_url}?api_key={#locker_api_key}&return=licenses", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") comment("Here I will convert the JSON response from the server to XML to make the response more simple to work with.") set(#Json_to_xml, $plugin function("xml plugin.dll", "$json to xml", #return_table), "Global") comment("Here I\'m extracting the IDS from the XML response") set(#IDS, $find regular expression(#Json_to_xml, "(?!<id>)[0-9]+(?=<\\/id>)"), "Global") comment("Here I\'m adding them to a list") add list to list(%ids, $list from text(#IDS, $new line), "Delete", "Global") comment("Here I\'m removing them from the variable so They don\'t take up needed memory space.") set(#IDS, $nothing, "Global") comment("Here I\'m removing the un needed id\'s from the list this Step is important to make sure we have the correct id\'s if the client made multiple purchases under the same checkout.") set(#ids_list_total, $list total(%ids), "Global") loop while($comparison($list total(%ids), "!=", $list total(%locker_info_project))) { decrement(#ids_list_total) remove from list(%ids, #ids_list_total) } set(#ids_pos, 0, "Global") set list position(%ids, #ids_pos) comment("Now I\'m setting the value of the list item to the variable called #client_key_id to send the email.") set(#client_key_id, $list item(%ids, #ids_pos), "Global") comment("This request will mail the client there license key") set(#email_key, $plugin function("HTTP post.dll", "$http get", "{#locker_api_url}?api_key={#locker_api_key}&mail_license_id={#client_key_id}", $plugin function("HTTP post.dll", "$http useragent string", "Chrome 32.0 Win7 64-bit"), #request_referer, #request_proxy, #request_timeout), "Global") increment(#ids_pos) increment(#project_info_Pos) if($comparison(#email_key, "=", "\{\"success\":\"true\",\"error\":\"\"\}")) { then { increment(#sent_keys_tracker) } else if($comparison(#email_key, "!=", "\{\"success\":\"true\",\"error\":\"\"\}")) { increment(#failed_keys_sent) } } } } } reset_and_clear() }Source Code: Tab Two define save_settings { save to file("{$special folder("Application")}\\settings\\credentials.ini", "") plugin command("IniFileReader.dll", "ini container", "{$special folder("Application")}\\settings\\credentials.ini") { plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Locker Username:", #locker_username) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Locker Password:", #locker_password) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "EDD Public Key:", #edd_api_key) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "EDD API Token:", #edd_api_token) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Locker API Path:", #locker_api_url) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "EDD API Path:", #edd_api_url) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Request Timeout:", #request_timeout) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Request Referer:", #request_referer) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Request Proxy:", #request_proxy) plugin command("IniFileReader.dll", "ini write", "EDD API Key, Token & Locker Credentials", "Wait Between Requests", #wait_request) } } define load_settings { plugin command("IniFileReader.dll", "ini container", "{$special folder("Application")}\\settings\\credentials.ini") { set(#locker_username, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Locker Username:"), "Global") set(#locker_password, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Locker Password:"), "Global") set(#edd_api_key, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "EDD Public Key:"), "Global") set(#edd_api_token, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "EDD API Token:"), "Global") set(#locker_api_url, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Locker API Path:"), "Global") set(#edd_api_url, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "EDD API Path:"), "Global") set(#request_timeout, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Request Timeout:"), "Global") set(#request_referer, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Request Referer:"), "Global") set(#request_proxy, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Request Proxy:"), "Global") set(#wait_request, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Wait Between Requests"), "Global") } } define reset_and_clear { plugin command("Variablemulti.dll", "Multi List Reset", "%xml_to_list %ids %xml_to_list %locker_info_project %locker_info_emial") plugin command("Variablemulti.dll", "Bulk Variable Set", "", "#client_key_id #email_key #ids_pos #project_info_Pos #ids_list_total #IDS #Json_to_xml #return_table #add_license #project #first_and_last_name #first_name #last_name #last_ten_clients #total_sales #monitor_new_sales #specific_customer #specific_customer_emial #product_project #client_email #request_store_sales #request_new_sales #xml_to_list_pos #request_locker_key #client_email #last_client #product_project #product_project #specific_customer #specific_customer_emial #first_name #last_name #return_table #Json_to_xml #locker_path_test #edd_path_test") } on load("Bot Loaded") { set(#read_credentials, $read file("{$special folder("Application")}\\settings\\credentials.ini"), "Global") if($comparison(#read_credentials, "!=", "")) { then { plugin command("IniFileReader.dll", "ini container", "{$special folder("Application")}\\settings\\credentials.ini") { set(#locker_username, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Locker Username:"), "Global") set(#locker_password, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Locker Password:"), "Global") set(#edd_api_key, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "EDD Public Key:"), "Global") set(#edd_api_token, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "EDD API Token:"), "Global") set(#locker_api_url, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Locker API Path:"), "Global") set(#edd_api_url, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "EDD API Path:"), "Global") set(#request_timeout, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Request Timeout:"), "Global") set(#request_referer, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Request Referer:"), "Global") set(#request_proxy, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Request Proxy:"), "Global") set(#wait_request, $plugin function("IniFileReader.dll", "$ini read", "EDD API Key, Token & Locker Credentials", "Wait Between Requests"), "Global") } } } set(#read_credentials, "", "Global") plugin command("Variablemulti.dll", "Bulk Variable Set", 0, "#num_api_calls #sent_keys_tracker #failed_keys_sent #infinite_loop") }Here is why I like easydigitaldownloads: https://easydigitaldownloads.com/extensions/EDD & Ubot Locker Integration v 2.2.ubot 5 Quote Link to post Share on other sites
giganut 109 Posted October 18, 2014 Author Report Share Posted October 18, 2014 Sorry guys I had forgot to add a file in the download, so you may need to download it again.I also added a link to a easy digital download extension that will let you run tests on the api withouthaving to wait for client sales. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 18, 2014 Report Share Posted October 18, 2014 Welcome and nice release bud. 1 Quote Link to post Share on other sites
giganut 109 Posted October 18, 2014 Author Report Share Posted October 18, 2014 Welcome and nice release bud. thank you TJ you where a great help. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted October 18, 2014 Report Share Posted October 18, 2014 Holly cow man that is huge!! Thank man!!! :) Can't wait to have time to play. TC 1 Quote Link to post Share on other sites
giganut 109 Posted October 19, 2014 Author Report Share Posted October 19, 2014 Holly cow man that is huge!! Thank man!!! :) Can't wait to have time to play. TC Thanks TC. Please everyone take note of the new changes added to the OP. Added some more needed notes. Edit: To make the software work correctly it's recommend that your store product is the same name as the project you have in your ubot locker licensing system, for example: if your product is called Facebook shares, then your project in the licensing system should also be called Facebook shares or the software will not work correctly. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted October 19, 2014 Report Share Posted October 19, 2014 Thanks for this giganut!Will check it later tonight. 1 Quote Link to post Share on other sites
giganut 109 Posted October 19, 2014 Author Report Share Posted October 19, 2014 Just an update, I'm working a small update for this and will post the new update when it's complete. Thanks for this giganut!Will check it later tonight. Thanks I'm glad you like it. Let me know what you think. Quote Link to post Share on other sites
giganut 109 Posted October 19, 2014 Author Report Share Posted October 19, 2014 Update complete: v 2.1 I added a valid $http get error: "The operation has timed out" instead of blank in some of the if statement, to protect the server from duplicate licence mailing on get request time-outs. I updated Tab ones source code block in the OP and added the new download + attached the new source in the OP. Quote Link to post Share on other sites
drhum 3 Posted October 19, 2014 Report Share Posted October 19, 2014 Just dropping by here to say thank you for giving this bot as free. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 19, 2014 Report Share Posted October 19, 2014 Wow this is pretty cool, great job! My only question is do you know if you have to change that file in Wordpress on every EDD update or not? I know they update on a fairly regular basis and it's not a huge deal or anything I am just curious 1 Quote Link to post Share on other sites
giganut 109 Posted October 19, 2014 Author Report Share Posted October 19, 2014 Thanks HelloInsomnia, As of right now, I'm not quite sure if that wordpress api file gets replaced with every update to the Easy Digital Downloads plugin or not, so I would recommend as of right now to cheak the file and make sure it's still off with every update to the Easy Digital Downloads plugin, but I can ask the developer. On the Easy Digital Downloads api reference page https://easydigitaldownloads.com/docs/edd-api-reference/ he gives an example of a filter that will turn off the logging proses, and suggest to make a wordpress plugin for the filter by using a wordpress plugin called pluginception https://wordpress.org/plugins/pluginception/ to added the filter, but I'm not good at .php so I could not get the job done, and had to edit the core file instead, with TJ's help. Here is the filter below, it would be great if anyone that knows how to make it would, and share it back for us all to use, so we don't have to check that file with every update to Easy Digital Downloads. If you wish to disable API Request logging, simply add this filter: add_filter( 'edd_api_log_requests', '__return_false' ); Wow this is pretty cool, great job! My only question is do you know if you have to change that file in Wordpress on every EDD update or not? I know they update on a fairly regular basis and it's not a huge deal or anything I am just curious Your welcome, and no problem. Just dropping by here to say thank you for giving this bot as free. Update Complete v 2.2: I added a Wait Between Requests option so you can adjust the speed that the software is connecting to your EDD api. Updated tab 1 and 2 source. 1 Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 6, 2014 Report Share Posted November 6, 2014 Hey Giganut, Seems the video was removed by user. Was about to set it up tonight. Just my luck.I would try to manage, but new to EDD as you know. I'll check back in tomorrow to see if there's a new video. Regards,HaHaItsJake 1 Quote Link to post Share on other sites
giganut 109 Posted November 6, 2014 Author Report Share Posted November 6, 2014 Sorry, I had to remove the video for security reasons, all the video showed was how to shut off the API log and setup the api keys. 1. Here is what you need to do first: Login to your site, then do the following. Go Here: https://yoursite.com/wp-admin/plugin-editor.php?file=easy-digital-downloads/includes/class-edd-api.php&a=te&scrollto=680 Do The Following: changed public $log_requests = true; from true to falseMake sure to change yoursite.com with your actual site. Let me know when you have that step complete, and I will assist you more here so everyone can see the steps if your site is not https then chage the link to http Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 6, 2014 Report Share Posted November 6, 2014 Sorry, I had to remove the video for security reasons, all the video showed was how to shut off the API log and setup the api keys. Here is what you need to do first:Login to your site, then do the following. Go Here: https://yoursite.com/wp-admin/plugin-editor.php?file=easy-digital-downloads/includes/class-edd-api.php&a=te&scrollto=680 Do The Following: changed public $log_requests = true; from true to falseMake sure to change yoursite.com with your actual site. Let me know when you have that step complete, and I will assist you more here so everyone can see the steps Step 1 Complete. Note: if you don't have SSL, the link will be http not https (might get a privacy error like me)Should I get SSL or going with out it for a few months is okay? Regards, HaHaItsJake 1 Quote Link to post Share on other sites
giganut 109 Posted November 7, 2014 Author Report Share Posted November 7, 2014 Step 1 Complete. Note: if you don't have SSL, the link will be http not https (might get a privacy error like me)Should I get SSL or going with out it for a few months is okay? Regards, HaHaItsJake Yes that is correct http Next Steps:2. Login to your site and follow the path: Downloads >> Tools >> API Keys.3. In the box that says Enter username, type your admin account username and press the button that says Generate New API Keys4. You will now see your username in the list with your new API keys, You will need to copy the Public Key and the Token. be sure to keep them in a safe place and never share them with anyone. Let me know when you have thouse steps complete, and we will continue. Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 7, 2014 Report Share Posted November 7, 2014 Step 2,3 and 4 Completed. Regards, HaHaItsJake 1 Quote Link to post Share on other sites
giganut 109 Posted November 7, 2014 Author Report Share Posted November 7, 2014 5. Now that you have your API keys you will need to go to this thread: http://www.ubotstudio.com/forum/index.php?/topic/16837-free-ubot-locker-api-to-manage-licenses-iphone-app-out-now/ and find the link direcly under the text: You can download the API file here: and donwload the ubot locker api.php file. 6. Now that you have the api.php file, you will need to upload that file to your ubot locker server directory. Let me know when you have that complete and we will continue. Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 7, 2014 Report Share Posted November 7, 2014 Step 5 and 6 Completed. Regards, HaHaItsJake Quote Link to post Share on other sites
giganut 109 Posted November 7, 2014 Author Report Share Posted November 7, 2014 Now that you have that complete you will need to set the interface of the software up: Locker Username: = your ubot locker username Locker Password: = your ubot locker password EDD Public Key: = your easy digital downloads public key you generated. EDD API Token: = your easy digital downloads token you generated. Locker API Path: = the path to the api.php file you uploaded, with no traling slash at the end. it will look somthing like this http://yoursite.com/ubotlocker/api.php EDD API Path: = the api path for your sites easy digital downloads api. it will be just like this, with no traling slash. https://yoursite.com/edd-api Request Timeout: = 60 Request Referer: = https://google.com or what ever you want Request Proxy: = blank unless you want a proxy.Request Proxy:Wait Between Requests = the time delay between each api call, you should be fine setting it at 20 or 30 depending on how many sales you make, and how fast.================================================================================ You should test the bot in ubot to make sure your not seeing any errors in the debugger. To run tests on your Easy Digital Downloads store it's recommend to use this paid plugin called manual purchase. Here is the link https://easydigitaldownloads.com/extensions/manual-purchases/ that way you can test the api live without having to wait for sales. 1 Quote Link to post Share on other sites
giganut 109 Posted November 7, 2014 Author Report Share Posted November 7, 2014 Here are the complete manual steps for setting up the Easy Digital Downloads & Ubot Locker API Integration. 1. Here is what you need to do first: Login to your site, then do the following. Go Here: https://yoursite.com/wp-admin/plugin-editor.php?file=easy-digital-downloads/includes/class-edd-api.php&a=te&scrollto=680 Do The Following: changed public $log_requests = true; from true to false Make sure to change yoursite.com with your actual site if your site is not https then chage the link to httpNext Steps: (2 - 4) 2. Login to your site and follow the path: Downloads >> Tools >> API Keys. 3. In the box that says Enter username, type your admin account username and press the button that says Generate New API Keys 4. You will now see your username in the list with your new API keys, You will need to copy the Public Key and the Token. be sure to keep them in a safe place and never share them with anyone.Next Steps: (5-6) 5. Now that you have your API keys you will need to go to this thread: http://www.ubotstudio.com/forum/index.php?/topic/16837-free-ubot-locker-api-to-manage-licenses-iphone-app-out-now/ and find the link direcly under the text: You can download the API file here: and donwload the ubot locker api.php file. 6. Now that you have the api.php file, you will need to upload that file to your ubot locker server directory. Next Steps: (7) 7. Now that you have that complete you will need to set the interface of the software up: Locker Username: = your ubot locker username Locker Password: = your ubot locker password EDD Public Key: = your easy digital downloads public key you generated. EDD API Token: = your easy digital downloads token you generated. Locker API Path: = the path to the api.php file you uploaded, with no traling slash at the end. it will look somthing like this http://yoursite.com/ubotlocker/api.php EDD API Path: = the api path for your sites easy digital downloads api. it will be just like this, with no traling slash. https://yoursite.com/edd-api Request Timeout: = 60 Request Referer: = https://google.com or what ever you want Request Proxy: = blank unless you want a proxy. Request Proxy: Wait Between Requests = the time delay between each api call, you should be fine setting it at 20 or 30 depending on how many sales you make, and how fast.Next Steps: (8) 8. Go into your wordpress site and follow this path: Downloads >> Reports >> Logs Then from the drop-down select API Request and press Apply. Now you will need to make sure the API request from the software are not being logged any longer. Make sure to cheack that log everytime you update Easy Digital Downloads to make sure the request are not being logged.Last Steps: (9) 9. You should test the bot in ubot to make sure your not seeing any errors in the debugger. To run tests on your Easy Digital Downloads store it's recommend to use this paid plugin called manual purchase. Here is the link https://easydigitaldownloads.com/extensions/manual-purchases/ that way you can test the api live without having to wait for sales. 1 Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 7, 2014 Report Share Posted November 7, 2014 Awesome, Just got it configured and running it, seem to be no errors. I don't have any extra money now days. Any other way to test it without waiting for sales? Test mode, or a "Free" product? Regards, HaHaItsJake Quote Link to post Share on other sites
giganut 109 Posted November 7, 2014 Author Report Share Posted November 7, 2014 Well, where there's a will there's a way, but I don't know of any other way, but surely there must be a work around, there always is. be sure to press save so you don't have to configure the software again. Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 7, 2014 Report Share Posted November 7, 2014 Well, where there's a will there's a way, but I don't know of any other way, but surely there must be a work around, there always is. be sure to press save so you don't have to configure the software again. I'll find a way. I just have 1 problem that I just found out. EDD API Path: = the api path for your sites easy digital downloads api. it will be just like this, with no traling slash. https://yoursite.com/edd-api I do not have a folder "edd-api" Regards, HaHaItsJake Quote Link to post Share on other sites
HaHaItsJake 25 Posted November 7, 2014 Report Share Posted November 7, 2014 Double Post- Sorry Nvm about the edd-api, I figured out the system with that url. Just not picking up/sending license for a "free" program. Regards, HaHaItsJake Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.