.. /* * This file is part of the SavaPage project . * Copyright (c) 2026 Datraverse B.V. * Author: Rijk Ravestein. * * SPDX-FileCopyrightText: (c) 2020 Datraverse B.V. * SPDX-License-Identifier: CC-BY-SA-4.0 * * For more information, please contact Datraverse B.V. at this * address: info@datraverse.com */ .. _app-plugin: .. figure:: ../images/manual/savapage-logo-no-text-100px.png :width: 75px |PRODUCT_NAME| Plug-ins ======================= .. admonition:: |ADMONITION_TABLE_OF_CONTENTS| - :numref:`{number}. {name} ` - :numref:`{number}. {name} ` - :numref:`{number}. {name} ` - :numref:`{number}. {name} ` - :numref:`{number}. {name} ` - :numref:`{number}. {name} ` A *plug-in* (aka “extension”) is a software component that adds a specific feature to |PRODUCT_NAME|. Plug-ins have a well-defined interface so partner developers can easily create isolated components that extend the application with new features. Extension interfaces are defined in the `savapage-ext `__ project. A plug-in is installed by copying its property file in ``/opt/savapage/server/ext`` and its jar files in the ``/opt/savapage/server/ext/lib`` directory. For example, the :ref:`Mollie Payment Plug-in ` is installed with these two files: .. code-block:: text /opt/savapage/server/ext/savapage-ext-mollie.properties /opt/savapage/server/ext/lib/savapage-ext-mollie-.jar .. important:: Since property files contain sensitive data make sure they are protected by executing commands like: .. code-block:: bash sudo chown savapage:savapage savapage-ext-mollie.properties sudo chmod 600 savapage-ext-mollie.properties .. _app-plugin-web-api-callback: Web API Callback Plug-in ------------------------ .. contents:: :depth: 1 :local: The Web API Callback method is used by many third-party providers who offer their services via HTTP. SavaPage supports this method with the ``/callback`` URL *path*. However, URL *protocol* and *authority* for the callback needs to be configured. Configuration is done by using the |RST_LINK_CONFIG_EDITOR| of the Admin Web App. The following configuration property is available: .. list-table:: Web API Callback Configuration Property :width: 100% :widths: 35 65 :header-rows: 1 * - Configuration property - Description * - ext.webapi.callback.url-base - The publicly accessible base URL, i.e. ``protocol://authority`` *without* the *path*, of the Web API callback interface (no trailing slash). |br| |br| If |PRODUCT_NAME| is implemented as intranet application to be accessed with a local URL, take care to configure proper port forwarding of the public base URL to the local |PRODUCT_NAME| server host name or IP address in your router or firewall. |br| |br| **Important**: use ``https`` protocol, and make sure the :ref:`SSL Certificate ` for public access is valid, i.e. not self-signed. When the certificate is invalid, a third-party service provider might not be able to deliver call-back messages. .. _app-plugin-payment-gateway: Payment Gateway Plug-in ~~~~~~~~~~~~~~~~~~~~~~~ .. contents:: :depth: 1 :local: The Payment Gateway Plug-in is based on the Web API Callback Plug-in and uses the ``/callback/payment`` URL *path*. The following configuration property can be set by using the |RST_LINK_CONFIG_EDITOR| of the Admin Web App. .. list-table:: Payment Gateway Configuration Property :width: 100% :widths: 40 60 :header-rows: 1 * - Configuration property - Description * - ext.webapi.redirect.url-webapp-user - The User Web App URL used by the Web API to redirect to after a *remote* Web App dialog is finished. |br| |br| Configuration is optional. SavaPage uses the local URL from which the remote excursion started as default. Payment Gateway events are persisted in the rotating log file: ``/opt/savapage/server/logs/paymentgateway.log`` This file has a tab separated value (TSV) format for easy import and manipulation into spreadsheet programs. .. _app-plugin-payment-gateway-generic: Generic Payment Plug-in ^^^^^^^^^^^^^^^^^^^^^^^ .. contents:: :depth: 1 :local: A Generic Payment Plug-in implements several payment methods behind a single Web API. Only one generic plug-in can be active. See :ref:`Financial `, :ref:`Transfer Money ` and :ref:`Payment Web App `. .. _app-plugin-mollie: Mollie Payment Plug-in '''''''''''''''''''''' `Mollie `__ is a Dutch payment provider that offers a single Web API for various payment methods, including: - Creditcard - PayPal - paysafecard - SOFORT Banking (Europe) - SEPA bank transfers (Europe) - Bancontact/Mister Cash (Belgium) - Belfius Direct Net (Belgium) - iDEAL | Wero (Netherlands). *Mollie supports the European Economic Area and Switzerland and accepts EUR payments only.* See the ``README.md`` of the `savapage-ext-mollie `__ project for more information. .. note:: The :ref:`Mollie Payment Plug-in ` is shipped with the SavaPage install binary. Generic Payment Pitfalls '''''''''''''''''''''''' Callback messages for generic payments return the identity of the user that started the payment in the :ref:`Transfer Money ` dialog. So, when a payment is acknowledged, we can easily add the amount paid to the user's balance. In some very unlikely cases a user might not be found. For example, when a database export is restored or a user was deleted, all in the short lifecycle of a payment transaction. In the rare case a user is not found, a warning message containing the user and transaction identification are written to the :ref:`Application Log `. With this information the user balance can be updated manually, after the user has been added again, either in the :ref:`Admin WebApp ` or with a :ref:`Server Command `.