bayzazi Posted September 12, 2013 Share Posted September 12, 2013 (edited) English translation (sorry) By finishing the development of a payment module, I have got wo blocking issues by using the module validator : Firstly : The module is not compatible with PrestaShop 1.4 (backward compatibility not found). however, on __construct(), I call require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); With all needed files. or maybe not ? Secondly: The code should be protected with a token /monmodule/payment.php /monmodule/validation.php How to protect theses files (that are not used, i call instead controller/payment.php and controller/validation.php) ? I dont't find any documentation about these, so if someaone can help me a little bit, it would be nice ! Best Hello à tous ! Sur la dernière ligne droite d'un dev de module de paiement, j'ai deux remontées bloquantes du validateur que je n'arrive pas à comprendre. La première : The module is not compatible with PrestaShop 1.4 (backward compatibility not found). Pourtant, dans la fonctionc __contruct() de mon module, j'ai bien require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); avec tout les fichiers requis dans le dossier. Ou peut etre pas ? La deuxième : The code should be protected with a token /monmodule/payment.php /monmodule/validation.php Alors que tous les appels à ces fichiers se font avec le customer secure key en paramètres. J'ai du mal à trouver de la doc relative à ces pb, voir pas du tout en fait. Si quelqu'un a des infos, ça n'est pas de refus ! Cordialement Edited September 12, 2013 by bayzazi (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted September 12, 2013 Share Posted September 12, 2013 English forum, please translate and repost Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted January 27, 2014 Share Posted January 27, 2014 Hi, you can use Tools::getToken(FALSE, Context::getContext()) for successfully pass Prestashop validation Regards Link to comment Share on other sites More sharing options...
MEG Venture Posted February 10, 2014 Share Posted February 10, 2014 Hi Alexander Where and how will we use Tools::getToken(FALSE, Context::getContext()) Could you please elaborate? Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted February 11, 2014 Share Posted February 11, 2014 Hi MEG Venture, in my case: <?php if (!defined('_PS_VERSION_') || (is_object(Context::getContext()->customer) && !Tools::getToken(FALSE, Context::getContext()))) { exit; } //... other logic Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now