I'm new to phpfox, I'm developing a payment module. Can anyone help me with the payment module? I have a zaakpay payment integration kit and i have all the necessary inputs. How should i need to integrate? Should need to do like paypal and 2checkout(they have written all the source code in library files) or should need to develop a new module ? Thanks in advance
1 Answers
When developing for PhpFox it is best to follow their conventions. When we have a library that needs to be added we add it to the library section:
/include/library/
So for your project it would be something like this:
/include/library/zaakpay
Than you will want to use the admincp to create a product first and then a module for your product.
http://example.com/admincp/product/add/
http://example.com/admincp/module/add/
All your code for your module will live in the module directory, I use payment as an example.
/module/payment
When you are developing your module you will need to refer to the other modules for examples of class names and file structure. It is a very strict convention.
PhpFox module settings are stored in the database, so it is very important to setup the modules correctly using the admincp. This will allow you to export your product, and have all the settings exported as well. You export your product from the admincp.
http://example.com/admincp/product/
The settings for your module will be in an xml file here:
/include/xml
The xml file only exists in the exported package, and it provides you the ability to install your product on another site. For example if you develop the code locally and want to move it to the production site.

- 1,212
- 9
- 8
-
Thank you for your answer, but i have done the module now i;m getting a warning as: **No security token has been set within the posted form. All forms must contain a security token in order for our site to handle its requests.** – Harsha Mullangi Jul 07 '14 at 18:14
-
I called this service file also `Phpfox::getService('log.session')->getToken()`. Even after that my error is displaying – Harsha Mullangi Jul 07 '14 at 18:22
-
The error message originates here: `/module/log/include/service/session.class.php` on line 57 – SamMonk Jul 07 '14 at 19:04
-
how can i clear that error? i don't no why the error is coming. I haven't seen such error while developing other things in phpfox – Harsha Mullangi Jul 08 '14 at 04:45
-
Are forms from the other PhpFox modules working without error? What is different between your form and those. I have seen some [references](http://phpfox.org/forum/thread/44211/no-security-token-has-been-set-within-the-posted-form-all-forms-must-contai/) to this error being caused by ssl settings, but I have no personal experience with it. You might want to post another question, so that others can contribute. – SamMonk Jul 08 '14 at 13:06