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
- Ensure that 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.
- Ensure that 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"/>