Tutorials > Payments > Develop a payment plug-in
Step 11: Testing the payment plug-in
This section refers to testing the payment plug-in.
- Prerequisites
- Payment Service Provider Simulator
To confirm that the payment plug-in is working properly:
Procedure
- Open WebSphere Commerce Developer.
- Open the Java EE perspective.
- In the Servers view, Right-click WebSphere Commerce Test Server and select Start from the pop-up menu, or Restart > Start if the server is already started.
- In a new browser window:
- Enter the following URL to go to the ConsumerDirect store:
http://localhost/webapp/wcs/stores/servlet/ConsumerDirect/index.jsp
- Place an order with the following payment information:
- In the Payment method field, select VISA Credit Card.
- In the Card number field, type 4111111111111111.
- In the Expiration month field, select 01.
- In the Expiration year field, select 2010.
- Click ORDER NOW. Confirm that you see the Order Confirmation page with the following message:
Your payment has been successfully authorized. Thank you for shopping at ConsumerDirect.
- Place another order with the following payment information:
- In the Payment method field, select VISA Credit Card.
- In the Card number field, type 4111111111111111.
- In the Expiration month field, select 01.
- In the Expiration year field, select 2012.
- Submit the order. Confirm that you see the following error message:
A generic payment user exception occurred. The exception is... "The expiry date is incorrect."
- In the Enterprise Explorer view, right-click Web Services > Services > PSPSimService and select Test with Web Services Explorer from the pop-up menu.
- In the Web Services Explorer:
- In the Operations section, click getTransactionRecordsByMerchantId.
- In the merchantId field, type CDMERCH.
- Click Go. Confirm that the Payment Service Provider Simulator has records of transactions corresponding to the order submissions above: