Step 5: Packaging the payments cassette plug-in

In this part of the tutorial you will learn how to package a WebSphere Commerce Payments plug-in. This step uses the payments cassette plug-in we created in Step 2 as an example.
Follow these steps to package the payment plug-in:

  1. Package the plug-in executables as a normal EJB module (JAR file) containing the following items:
    • The EJB module with EJB home, interface, and implementation (required):
      • plug_in_name.class: MyWCPaymentsPlugin.class
      • plug_in_nameBean.class: MyWCPaymentsPluginBean.class
      • plug_in_nameHome.class: MyWCPaymentsPluginHome.class
    • The plug-in deployment descriptor (required):
      • PluginDeployment.xml
      The name of the XML file representing the plug-in deployment descriptor should always be "PluginDeployment".
    • The standard EJB deployment descriptor (required):
      • ejb-jar.xml
    • The JAR file manifest (required):
      • Manifest.MF
    • Any required utility JAR files that are used by the EJB module. If your plug-in JAR file uses other JAR files in the library, ensure that the manifest file includes the appropriate files.
      lib\payment\etillCal.zip is already included in WebSphere Commerce for WCPaymentsPlugin, so we don't need to package this jar again for MyWCPaymentsPlugin.
    • Any required properties files and configuration files:
      MyWCPaymentsPluginErrorMessages.properties and the profiles files used by MyWCPaymentsPlugin:

  2. You can check the attached Payments-Plugin-MyWCPayments.jar for reference

  3. Export the EJB jar from Rational Application Developer:
    1. In the Project Explorer view, navigate to EJB Projects > Payments-Plugin-MyWCPayments.
    2. From the Payments-Plugin-MyWCPayments project's pop-up menu, select Export.
    3. Right-click Payments-Plugin-MyWCPayments and select Export > EJB JAR file.
    4. In the Export window, the EJB project name is pre-populated. In the Destination field, enter or browse to a temporary directory that will hold your exported code, such as C:/exporttemp/Payments-Plugin-MyWCPayments.jar.
    5. Click Finish.
  4. Prepare the documentation for the plug-in. A plug-in implementation should be accompanied by documentation describing how to deploy, set up, and use the plug-in. This documentation should cover how to configure any plug-in-specific properties in the deployment descriptor, any required EJB user roles and permissions, and any dependency in third-party libraries. It should also cover the set of name-value pairs expected by the plug-in to process financial transactions (such as those required to validate billing addresses).
    For an example of the type of documentation you can produce, see the description for one of the plug-ins provided by WebSphere Commerce.

Now you have packaged your new payment plug-in.

In the next step of the tutorial you will learn how to install the payment plug-in into the IBM WebSphere Commerce server.