Rotating Transaction Gateway Logic
This document will describe the business rules that UltraCart performs to determine which rotating transaction gateway (RTG) should be used for a given order.
Determine which RTGs are allowed to be used (the active set)
By default all active RTGs are considered for a transaction.
If an order is a rebill, use the same RTG as the original order. This transaction affinity is important for many gateways as they will not allow transactions without a CVV unless they processed the original transaction with a CVV code.
If a specific RTG code is specified via a UCEditor parameter or on the cart for a REST API call, then it will be used if possible.
Next the system looks at the items on the order first to last. If the item contains an RTG configuration at the item level then the first configuration is used. The first item in the order with an RTG will override the entire order.
If a specific RTG has been determined at this point, but it does not support the credit card type the customer is using, the RTG is selection is ignored and the list of valid RTGs to consider is opened back up to all active RTGs.
If the Screen Branding Theme / StoreFront is restricted to specific RTGs then those are filtered out from the possible list.
If the RTG is over it’s trial or time period limits then those are filtered out from the possible list.
If an RTG supports a particular native currency that the customer is checking out with, then the list is filtered down to that particular RTG so the customer receives a native currency transaction.
If everything has been filtered out for one reason or another, fail back to all active RTGs as a safety precaution.
Selection (picking one from the active set)
Pick a random number between 0-100 and see which RTG has that part of the traffic percentage.
If the possible RTGs have a traffic percentage that does not equal 100, UltraCart normalizes it so that the ratios of traffic are correct.
Configuration Scenarios
You have a set of gateways that you want to load balance traffic over for a particular StoreFront.
Configure each RTG to have 50% of the traffic.
Configure each RTG to be restricted to the given StoreFront.
You have a particular product that is only underwritten for a specific gateway.
Configure the item level RTG selection so that if this product is purchased, the entire transaction will route to this gateway.
I don’t want to send traffic to an RTG any more, but still want to process refunds for a certain time period.
Configure the RTG to have 0% traffic, but leave it active.
Â