Develop > Controller layer > Payments subsystem
Create 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
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 the 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
- Create a payment plug-in using Rational Application Developer
- 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 the plug-in.
- Create a new EJB bean for the plug-in project. 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.
- Build the plug-in project to compile the enterprise bean.
- Generate deployment code for the enterprise bean.
- Package the payment plug-in.
- Install the payment plug-in.
Related concepts
Payment financial transaction state
Plug-in exception handling and transaction roll-back
Related reference