As described in CorePaymentActions XML file, you can configure the CorePaymentActions.xml file to process deposits in a cumulative or noncumulative way. The following examples illustrate different ways you can configure the deposit actions to occur in the <TargetDeposited> element in the CorePaymentActions.xml file.
Example 1: Cumulative deposit. In this configuration, there is no financial transaction that will take place with a payment back-end system (the action is ConsumeAmount and not a Deposit action). Instead, the system updates the payment amount internally for the business phase to know how much of the payment is being consumed.
<TargetDeposited> <CurrentApproved> <AmountGreaterThanRequested> <Action name="ConsumeAmount"/> </AmountGreaterThanRequested> <CurrentApproved> </TargetDeposited>
Example 2: Noncumulative deposit with an Approve action and Deposit action in separate calls. In this configuration, the existing approval amount is reversed. Two separate approvals will occur and a deposit. No approval amounts will expire in the payment back-end system.
<TargetDeposited> <CurrentApproved> <AmountGreaterThanRequested> <Action name="ReverseApproval" amount="zero" target="existing"/> <Action name="Approve" amount="requested" target="additional"/> <Action name="Deposit" amount="requested" target="existing"/> <Action name="Approve" amount="delta" target="additional"/> </AmountGreaterThanRequested> <CurrentApproved> </TargetDeposited>
Example 3: Noncumulative deposit with an Approval and Deposit action in one call. In this configuration, the existing approval amount is reversed. An Approve and Deposit action occurs at the same time. An additional approval action will occur. No approval amounts expire in the payment back-end system.
<TargetDeposited> <CurrentApproved> <AmountGreaterThanRequested> <Action name="ReverseApproval" amount="zero" target="existing"/> <Action name="ApproveAndDeposit" amount="requested" target="additional"/> <Action name="Approve" amount="delta" target="additional"/> </AmountGreaterThanRequested> <CurrentApproved> </TargetDeposited>
Examples 2 and 3 show more than one action or financial transaction taking place. If you are using the SimpleOfflinePlugin payment plug-in and have configured the SimpleOfflinePlugin.xml file to keep transactions in a pending state for manual intervention, example 2 or 3 cannot be used because each action will require a manual approval. You can minimize the number of actions requiring manual intervention by using example 1 instead.