Install a payment plug-in into a WebSphere Commerce Development Environment

To install an external or third-party payment plug-in into the Rational Application Developer workspace, follow these directions. The instructions use the example of a plug-in called SamplePlugin.

  1. Stop the WebSphere Commerce Test Environment Server.
  2. Import the plug-in EJB JAR file for the plug-in you want to install in your workspace:

    Binary code

    If the external plug-in code is available in binary form (a plug-in JAR file was provided), import the plug-in EJB JAR file into the workspace as an EJB project and the plug-in module should be automatically added into the WebSphere Commerce Server.

    Source code

    If the external plug-in code is available as source code, you can do either of the following options, although the first one is recommended:

    • Import the payment plug-in EJB files into the WebSphereCommerceServerExtensionsData project. The WebSphereCommerceServerExtensionsData project is a predefined project for customized enterprise beans that is available to you for generating deployed code for the lightweight test environment. The README that accompanies the lightweight development version of IBM WebSphere Commerce provides instructions on importing EJB projects.
    • Create a new EJB project for the payment plug-in in the WebSphere Commerce Developer workspace. Then, import the plug-in source code into this new EJB project. Finally, add the wcs.jar file into the plug-in project's build path. The wcs.jar file provides the set of classes a payment plug-in developer will need to develop a payment plug-in.
  3. Copy the plug-in deployment descriptor from the EJB plug-in project (or location where the file has been provided) into the ppc\plugins configuration directory. Be sure to create a subdirectory with the plug-in name. For example:
    • WCDE_installdir\xml\config\payments\ppc\plugins\SamplePlugin\PluginDeployment.xml
  4. Ensure that the name of the plug-in inside the deployment descriptor matches the name of the directory in which you placed the deployment descriptor.
  5. Add the following lines to the PaymentSystemPluginMapping.xml file as shown. The file location is: WCDE_installdir\xml\config\payments\ppc\plugins\PaymentSystemPluginMapping.xml.
    <PaymentSystemName name="SampleSystem" >
      <Mapping paymentConfigurationId="default"
      PluginName="SamplePlugin" >
      </Mapping>
      </PaymentSystemName> 
    

    This will create a mapping between a system name called 'SampleSystem' to the plug-in 'SamplePlugin' you just imported into your directory.

  6. If the plug-in came as source code, build the plug-in project.
  7. Generate the plug-in EJB deployment code and rebuild it.
  8. Update the Payment Rules configuration so that a payment method is mapped into the payment system name 'SampleSystem', as you have defined in step 5.
  9. Follow any documentation provided by the plug-in provider to complete any remaining installation or configuration steps.
  10. Publish and start the server.