websavers Posted December 10, 2011 Share Posted December 10, 2011 (edited) Jules, You're right, I'm sorry I didn't ask beforehand. I've become accustomed to non-encrypted code (with unspecified licensing) having an implied 'do what you like with this' meaning to it. We can have a forum admin take it down if you'd like; just say the word! If it helps at all, author credit is, of course, ascribed to you. Jordan Edited December 10, 2011 by jas8522 Clarification Link to comment Share on other sites More sharing options...
JulesR Posted December 10, 2011 Author Share Posted December 10, 2011 Sure, I provided the code non-encrypted so that others could make their own local modifications if necessary, not really with the intention that someone would take the bulk of what I did and make something else of it. But no harm done Your code seems to be based on an old version of my hook by the way. I made some tweaks and changes later on to ensure it only looks at PayPal subscriptions, etc. Also, maybe I'm not too clear on how addon modules work, but how does your modification hook into the addons and actually do its thing? I had planned to turn this into an addon at some point in the next few weeks, but in the meantime feel free to work on it if you'd like. Link to comment Share on other sites More sharing options...
websavers Posted December 10, 2011 Share Posted December 10, 2011 Ah, I see what you mean. I wasn't thinking of this as something completely new - I just added the module wrapper around your hook and adjusted the authentication system to be a bit more robust. Considering 95% of that module is all your code (if not more than that), I was just thinking of it as a slight improvement or patch. Yeah the code I used was from your first post - I was forgetting that we don't get access to edit those posts after a while and thought you might have been editing that all along. I'd love it if you would take the module wrapping and integrate that with your newer code! When you upload the module into the add-ons folder, WHMCS recognizes from the information at the top of the main php file. It also reads the hooks.php file and integrates them appropriately, just like any normal hook. This is what I mean by it not being a major modification (from the coding side) because the module portion itself does absolutely nothing - it's only there for easy installation. All the good stuff (your code) is in hooks.php which I only modified slightly to grab the PayPal user info from the DB. For clarification, the only adjustments I made to the hook itself (found in hooks.php) are found at the top of your PPHttpPost function: $paypal_api_query = "SELECT setting,value FROM `tblpaymentgateways` WHERE gateway = 'paypal' AND setting LIKE 'api%'"; $result = mysql_query($paypal_api_query); while ( $row = mysql_fetch_array($result) ) { if ($row['setting'] == 'apiusername') $username = $row['value']; else if ($row['setting'] == 'apipassword') $password = $row['value']; else if ($row['setting'] == 'apisignature') $signature = $row['value']; } $API_UserName = urlencode($username); $API_Password = urlencode($password); $API_Signature = urlencode($signature); It would be great if you would merge that with your updated hooks file and integrate it with the module wrappings! Cheers, Jordan Link to comment Share on other sites More sharing options...
JulesR Posted December 10, 2011 Author Share Posted December 10, 2011 Ah I gotcha, thanks I've made this as an addon now, with configurable options and hooks. Moved to this thread: http://forum.whmcs.com/showthread.php?t=43757 Link to comment Share on other sites More sharing options...
websavers Posted December 11, 2011 Share Posted December 11, 2011 Ah I gotcha, thanks I've made this as an addon now, with configurable options and hooks. Moved to this thread: http://forum.whmcs.com/showthread.php?t=43757 Excellent! Link to comment Share on other sites More sharing options...
JulesR Posted December 11, 2011 Author Share Posted December 11, 2011 Hopefully you didn't feel I've tried to undermine your previous efforts - that wasn't my intention at all. I had originally planned to make it an addon module (it's much nicer to click buttons than it is to edit PHP code) but just hadn't gotten round to it. Your post inspired me I think I do have some other ideas I plan to implement to the addon too, so those will be coming at some point. I also have some other addons I want to work on, it's just time time time.... Link to comment Share on other sites More sharing options...
jozeph Posted January 7, 2013 Share Posted January 7, 2013 Download is not available anymore. Anyone can send me the latest file? Link to comment Share on other sites More sharing options...
JulesR Posted January 20, 2013 Author Share Posted January 20, 2013 No. Please do not send any old versions of my addons to others. I am releasing this with many additional features as a premium addon in the near future. In the meantime can we close the thread please? Link to comment Share on other sites More sharing options...
Recommended Posts