Migrate > Take the first steps after WebSphere Commerce migration > Migrating from a previous payment implementation > Migrating from WebSphere Commerce Payments Multipayment Framework to a payment plug-in
Convert custom V5.x payment task or policy command implementations to a payment plug-in
To convert custom implementations of the V5.x payment task commands (that is, DoPaymentCmd, DoDepositCmd) or payment policy commands (that is, DoPaymentPolicyCmd, DoDepositPolicyCmd) to a payment plug-in:
Procedure
- Create a payment plug-in.
- Move the Doxxxxx command logic that you use to communicate with the payment back-end system to the appropriate payment plug-in method:
- Move the DoCancel command to the reverseApproval payment plug-in method
- Move the DoPayment command to the approve payment plug-in method
- Move the DoDeposit command to the deposit payment plug-in method
- Move the DoRefund command to the credit payment plug-in method
- Verify the task and policy command properties are available to the payment plug-in as attributes in the interface value objects or as name-value pairs inside the payment protocol data (ExtendedData). That is, ensure the payment plug-in can get all payment protocol data needed by the Payment Service Provider.
- Verify the payment plug-in does not contain business policy logic. If special business policy code is required, it should be used before thepayment rules logic is used.
- DoPaymentCmd is called at order submission.
- DoDepositCmd is called at order fulfillment.
- DoCancelCmd is called at order cancel.
- DoRefundCmd is called at RMA close.
- If special configuration data is needed, use the plug-in deployment descriptor to define this data. For example, to configure the IP address and port number of the payment server add the following lines to the plug-in descriptor:
<PluginProperty name="hostName" value="black.cn.ibm.com"/> <PluginProperty name="port" value="5433"/>
- Replacement commands for WebSphere Commerce Payments Multipayment Framework commands
The payments commands interface names are in API information package com.ibm.commerce.payment.commands. If you customized or extended a WebSphere Commerce Payments Multipayment Framework command do not move the customized code to the replacement command.
Related concepts
Related reference
Replacement commands for WebSphere Commerce Payments Multipayment Framework commands
Payment, refund and return payment business policies