Payment rules engine
The Payment rules engine determines which action to take based on the payment instruction, payment method and the payment event.
The following example shows the steps completed by the Payment rules engine when a customer pays for an order using a Visa credit card.
- Determines the payment action rule.
The Payment rules engine reads the Payment system mapping (PaymentMappings.xml) file.
<Mapping paymentMethod="VISA" paymentConfiguration="CreditCardOnline" paymentActionRule="Early Approval"/>
- paymentMethod
- The payment method name as defined in the POLICY table.
- paymentConfiguration
- The payment method is associated to a payment back-end system as defined in PaymentMethodConfigurations.xml file.
- paymentActionRule
- The payment actions behavior for the payment method as defined in PaymentRules.xml file.
- Determines the target state.The Payment rules engine reads from the PaymentRules.xml file. This is a read-only file that configures the payment rules for a store or store group. Each entry defines the target state of the relevant payment amount for each payment event in the order.
<PaymentRule name="Early Approval"> <PrimePaymentEvent targetState="APPROVED" /> <ReservePaymentEvent targetState="APPROVED" /> <FinalizePaymentEvent targetState="DEPOSITED" /> </PaymentRule>
- Determines the actions.
The Payment rules engine reads from the CorePaymentActions.xml file. This read-only file defines how the required target state of the payment is achieved in terms of payment actions defined by the payment back-end system.
<TargetApproved> <CurrentDNE> <Action name="Approve" amount="requested" target="new"/> </CurrentDNE> </TargetApproved>
- Creates and raises an event for the actions. In this example, the event will consist of a single action: Approve.
Related concepts
Payment actions
Related reference
Payment rules provided in WebSphere Commerce
Payment configuration files
CorePaymentActions XML file