Tutorials > Payments > Develop a payment plug-in
Step 4: Creating the error message properties file
The payment plug-in API methods that is implemented in the step 3 contains references to a number of message keys. In this step, we will create the properties file that contains the corresponding error messages.
- Prerequisites
- Payment Service Provider Simulator
Procedure
- Open WebSphere Commerce Developer.
- Open the Java EE perspective.
- In the Enterprise Explorer view, right-click EJB Projects > MyPaymentPlugin > ejbModule > com.mycompany.payment.plugin; then click New > File.
- In the File name field, type MyPaymentPluginMessages.properties; then click Finish.
- In the MyPaymentPluginMessages.properties editor, insert the following code:
PLUGIN_RC_1001=The expiry date is incorrect. PLUGIN_RC_1002=The card has been suspended. PLUGIN_RC_1003=The card number is invalid. PLUGIN_RC_2001=The currency is not supported. PLUGIN_RC_2002=The credit limit of the card is exceeded. PLUGIN_RC_2003=The authorization number is invalid. PLUGIN_RC_2004=The authorization number is invalid. PLUGIN_RC_2005=The authorization number is invalid. PLUGIN_RC_2006=The card number is incorrect. PLUGIN_RC_2007=The amount is incorrect. PLUGIN_RC_3001=An internal error has occurred. PLUGIN_CONFIGURATION_EXCEPTION=The plugin is not properly configured. PLUGIN_COMMUNICATION_EXCEPTION=A communcation problem has occurred. PLUGIN_INTERNAL_ERROR_EXCEPTION=An internal error has occurred. PLUGIN_FUNCTION_NOT_SUPPORTED_EXCEPTION=The function is not supported. PLUGIN_INVALID_CARD_NUMBER=The card number is invalid. PLUGIN_INVALID_EXPIRY_DATE=The expiry date is invalid. PLUGIN_INCORRECT_EXPIRY_DATE=The expiry date is incorrect. PLUGIN_CARD_SUSPENDED=The card has been suspended. PLUGIN_CREDIT_LIMIT_EXCEEDED=The credit limit of the card is exceeded.
- Close the MyPaymentPluginMessages.properties editor and save the changes. The finished MyPaymentPluginMessages.properties can be found here.