I'm developing a Prestashop module which I need to protect against
easy code modification (I'm completely aware there is no program that can't be decompiled in certain way or at least being opcode-exposed)
make sure each client pays for the module
after spending ~1 hour thinking on this, I came out with the following solution:
- Implement a serial key validation based on the value of
PS_SHOP_DOMAIN
- Encrypt the source code with PHP's blenc_encrypt (http://php.net/manual/en/book.blenc.php)
- Make a configuration view in the module that would allow the user to paste the key that was previously purchased from my website.
My question is, what parts of Prestashop actually depend on PS_SHOP_DOMAIN
? Is that value important enough* or should I use something else? And, if I should use something else, what would that be?
*important enough - being used by an important part of the code, thus making is impossible to change the value without breaking the entire Prestashop installation.