All of the apps in PayPlans are just plugins with the group of payplans in Joomla. Installing it is as easy as installing a plugin in Joomla and enabling the plugin.
With PayPlans 4.2, third-party developers can create their own app easily by including a app.payplans file in the plugin.
App Structure
In most apps, the structure of the app should be as the following:
App
| _ _ _ app/
| _ _ _ config/
| _ _ _ app.php
| _ _ _ app.xml
The breakdown of each of these items are as below:
app/folder is the main folder that contains the main app file for PayPlans.config/folder is the configuration folder that contains configuration files for PayPlansapp.php is the standard plugin file for Joomla plugins
app.xml is the standard manifest file for Joomla plugins.
App Folder
The app folder must contain at least a single php file that has the same element as the app. If the name of your app is example, there must be an example.php file in the app folder
In the example.php file, your class name should also match the name of your app. In this case, it should be PPAppExample and it should extend the PPApp class.
There are several methods that are triggered in this class and you can see them by downloading the example plugin.
Config Folder
The config colder must contain at least the app.payplans file so that PayPlans would be able to identify the app when the site admin tries to create a new payment gateway from the back-end.
The contents of the app.payplans should be as below:
{
"type": "app",
"name": "Example",
"element": "example",
"description": "This is a sample payment gateway app for PayPlans"
}
typemust be either of the following when you are building a standard app:app- For standard appsautomation- For automation appspayment- For payment gateways
namecan be anythingelementmust be the same element as your plugindescriptioncan be anything and it will appear at the back-end when creating a new payment method
Sample Plugin
You can download a sample plugin to get a better idea of what is included in the payment plugin: