Page tree
Skip to end of metadata
Go to start of metadata

Plugins are used to extend the functionality of platform and you can develop your own payment gateway plugin for integrating with the gateway you wish. This article will guide you through the process of creating your own plugin. The architecture is designed here.

How to write a Payment Gateway plugin for platform

The plugin structure, required files, and locations:

  1. First thing you need to do is to download SDK's assemblies from here.
  2. Next step is to create a new "Class Library" project in your solution.  A required name for a plugin project is "Interworks.Plugin.PaymentGateways.{Name}.dll".  After the project is created you have to reference all the dll files from step 1 in your project.

    - The name of plugin's project must follow the pattern : Interworks.Plugin.PaymentGateways.*.  The dll output must be something like Interworks.Plugin.PaymentGateways.<YourPluginNameHere>.dll .
    For example, Interworks.Plugin.PaymentGateways.Paypal.dll .

    - Plugin's project must have target framework 4.5.2 and your project can be a class library project (check the picture). Our platform cannot support earlier versions of > 4.5.2 .NET Framework .Please check the image below:

    IMPORTANT: Start your project like this one: 

  3. Next required step is to create a class which implements the PaymentGatewayBase class that already implements IPaymentGateway interface methods.  

    The namespace's name must be like Interworks.Plugin.PaymentGateways.{Name}. In addition, a recommended name for the class is {Name}Processor.For example, PaypalProcessor.cs.  Also it is required to decorate the class with the PluginName attribute that will be saved at platform database. Check the example below which is an approved class:

    namespace Interworks.PaymentGateway.Plugin.Paypal
        public class PaypalProcessor: PaymentGatewayBase

    The Payment Gateway Integration SDK has the PaymentGatewayBase class which already implements all IPaymentGateway methods. It contains some methods which are specific only for payment gateways such as PrepareTransaction() or ExecuteTransaction(). 

    Important Note:

    You have to override all methods and fields of the base class. Leave some methods and throw a "not implemented yet" excecption that are not required for your plugin. All methods are not needed for all Payment Gateway Categories

  4. Now, when the plugin implementation is ready you have to:

    Either for the platform: Pack the output's dlls (a zip file) and contact our company to review and activate your plugin. Or for platform installations: - You have to place the assemlies of your plugin's project to the bin folder of BSS (\bss\bin) and Marketplace (\storefront\bin) web apps folders of your installation.

    - If your plugin, its category, needs the client-side js processor as described here, you have to place them to this folder of your installation: \js\PaymentGateways of the BSS and Marketplace web apps.

    - Run the following sql scipt for the installation database to activating the plugin:

INSERT INTO tblPaymentGateway ([Name], [Type], [IsSupported], [PCICompliant])
VALUES ('Paypal Standard', 'paypalstandard',1, NULL);
// ...[PluginName("paypalstandard")]
// Type and PluginName must be lowercase

Important: Upgrading platform may break plugins

Some plugins may become outdated and will no longer work with the newer version of platform. If you have issues after upgrading to the newer version, delete the plugin and visit the official website to see if a newer version is available and change our plugin's project. Then, follow the deployment procedure that is described above. 


Hopefully this will get you started with platform Payment Gateway Integration Framework  and prepare you to build more elaborate Payment Gateway plugins.

  • No labels