Creating a payment plug-in

Before you begin

Before creating a payment plug-in for use in WebSphere Commerce, you should:

  • Be familiar with Java programming
  • Review the Payment plug-in specification
  • Review the API information related to the plug-in specification: com.ibm.commerce.payments.plugin

About this task

You can create a payment plug-in with or without WebSphere Commerce, or with or without WebSphere Commerce Developer or Rational Application Developer. The following instructions summarize how to create a payment plug-in using Rational Application Developer. If you are not using Rational Application Developer, follow comparable procedures to do the following steps:

  • Create an EJB stateless session bean.
  • Ensure your plug-in remote interface extends the Plugin or QueryablePlugin interface.
  • Create a plug-in deployment descriptor.
  • Create a JAR file (EJB module).

To create a new payment plug-in using Rational Application Developer, perform the following steps:

Procedure

  1. Create a payment plug-in using Rational Application Developer
    1. Create a new EJB project using the EJB 2.0 specification.
      • In the EAR project field, enter WC.
      • For available dependent JAR files, include Payments-Plugin.jar.
      The project name should reflect the name of your plug-in.
    2. Create a new EJB bean for the plug-in project. Be sure to specify the bean is a session bean with a stateless session type. The bean creation should generate a plugin_name.java, plugin_nameBean.java, and plugin_nameHome.java files. The bean must implement the methods described in the Plugin interface (see the API information for more information). Your plug-in remote interface must extend the Plugin, Plugin_V2, or QueryablePlugin interface. Be sure to follow the Plugin specification when creating plug-in files.
    3. Build the plug-in project to compile the enterprise bean.
    4. Generate deployment code for the enterprise bean.
  2. Package the payment plug-in.
  3. Install the payment plug-in.