Step 6: Installing the payments cassette plug-in in the runtime server
In this part of the tutorial you will learn how to install your new payment plug-in to an existing WebSphere Commerce instance.
Now you can place orders with the new payment method and the new payment plug-in.
- Ensure that WebSphere Commerce is installed and a WebSphere Commerce instance is created and started.
- Stop your target WebSphere Commerce application:
- Open the WebSphere Application Server administrative console by entering the following URL in a Web browser: http://your_fully_qualified_server_name:port/ibm/console
where:
- your_fully_qualified_server_name is the name of your target machine.
- port is the port number of the administration console for the profile where WebSphere Commerce instance is deployed.
- Click Applications > Enterprise Applications to see a list of installed applications.
- Select your WebSphere Commerce application, for example WC_demo, and click Stop.
- Copy the plug-in JAR file to the temporary location:
C:\tempdir\Payments-Plugin-MyWCPayments.jar.- Export a backup copy of the EAR file, so that you can revert to the old version in the future if you want to. To export a backup copy of the EAR file:
- In the WebSphere Application Server administrative console, click Applications > Enterprise Applications to see a list of installed applications.
- Select your WebSphere Commerce application, for example WC_demo, and click Export.
- Follow the wizard and save your EAR file in a backup directory. If the EAR file is large, this action might take some time.
- Add the EJB module to the EAR project:
- In the WebSphere Application Server administrative console, select the application name, for example WC_demo, and click Update.
- Select Single Module.
- In the Relative path to module field, type Payments-Plugin-MyWCPayments.jar.
- Select Local file system and specify the path to the Payments-Plugin-MyWCPayments.jar file. For example, drive:\ImportTemp\ Payments-Plugin-MyWCPayments.jar.
- Click Next.
- In the Prepare for the application installation screen, leave all default values and click Next.
- On the Application Security Warnings screen, click Continue.
- On the Install New Application screen, click Step 10: Summary.
- A summary of changes is displayed. Click Finish.
- When the update is completed successfully, click Save to Master Configuration.
- On the Enterprise Applications screen, click Save to save your changes to the master configuration. All your changes are saved.
- Close your WebSphere Application Server administration console.
- Copy the deployment descriptor file and other required configuration files (profiles for this tutorial) to the following location:WC_eardir/xml/config/payments/ppc/plugins/MyWCPaymentsPlugin/<FileName> Where:
- MyWCPaymentsPlugin represents the name of the plug-in. (Be sure to create a subdirectory with the plug-in name.)
- <FileName>
- (Required) PluginDeployment.xml to store the configuration information of this plug-in.
(Optional) PluginProperties.xml to store the parameters of merchant configuration information should be encrypted.- 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.
- Configure the payment plug-in for WebSphere Commerce server according to step 4 of this tutorial.
Stop and start WebSphere Application Server to pick up the changes that you made:
- At a command prompt, navigate to WC_profiledir\bin.
- Stop the WebSphere Application Server. For example, on the Windows operating system, type stopServer server1. The server has stopped successfully when you see the message: Server server1 stop completed.
- Start the WebSphere Application Server. For example, on the Windows operating system, type startServer server1. Wait until you see a message similar to: Server server1 open for e-business; process id is 3740.
- Navigate to WC_profiledir\logs\server1.
- Examine the SystemOut.log file. Check that the server started successfully without errors.
(C) Copyright IBM Corporation 1996, 2006. All Rights Reserved.