IPP Europe

Building Plugins for Merchant Portal

You are here:

Build Plugins

MerchantPortal is an Open Source Administrative platform for Merchants of Payment Service Providers and Payment Facilitators using the IPP environment.

Within the Portla there are several opportunities to build plugins, and the number of plugins is rising every month.

Before you start building your own plugin, we encourage you to review some of our existing plugins to see which methods and opportunities you have.

Some of the more technical plugins are the Plugin Own SMTP Server and Daily Mail Transactions.

Required files in the Plugin

Each plugin requires two files:

  • index.php
  • init.php

Initiation

You initiate the plugin by adding a class with the plugin slug which must extend the class IPPPlugins.

				
					class testing_plugin extends IPPPlugins
{
    protected $fields;
    public $id;


    public function __construct()
    {
        $this->slug = "testing_plugin";
        $this->id = "testing_plugin";
        $this->title = "Testing Plugin";
        $this->image = "https://gcdn.ippeurope.com/wp-content/uploads/IPPeurope-logo-dark.png";
        $this->setFields();
    }
    public function initialization() {
        $this->setFields();
        parent::setAvailablePlugin("testing_plugin");
    }
    public function setFields()
    {
        $this->fields = [
            [
                "id"            => "site_id",
                "name"          => "site_id",
                "title"         => "The Site Id",
                "description"   => "Here you insert the Site id",
                "example"       => "XXXXXXXXXXX"
            ],
            [
                "id"            => "site_url",
                "name"          => "site_url",
                "title"         => "The Site URL",
                "description"   => "Inser the Site URL used in the Plugin.",
                "example"       => "https://XXXXX.XXX"
            ]
        ];
    }
}
				
			

Settings

You can initiate the settings fields by the variable fields.

These fields will automatically be share with the IPPPlugins class, and become visible on the Merchant Portal.

The SMTP Plugin for SendGrid shows an opportunity to hide required setting fields, if they are static and/or should not be displayed to the user.

Packaging the plugin

The packaging of the plugin shall happen directly into the ZIP-file, meaning you do may not add a folder for the plugin files.

NB: When you are uploading the plugin into the Merchant Portal, it will test the plugin if it have the core basics of what a plugin must contain. But it do not mean that you can’t make mistakes.