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)

  1. By default all active RTGs are considered for a transaction.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. If the Screen Branding Theme / StoreFront is restricted to specific RTGs then those are filtered out from the possible list.

  7. If the RTG is over it’s trial or time period limits then those are filtered out from the possible list.

  8. 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.

  9. 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

  1. You have a set of gateways that you want to load balance traffic over for a particular StoreFront.

    1. Configure each RTG to have 50% of the traffic.

    2. Configure each RTG to be restricted to the given StoreFront.

  2. You have a particular product that is only underwritten for a specific gateway.

    1. Configure the item level RTG selection so that if this product is purchased, the entire transaction will route to this gateway.

  3. I don’t want to send traffic to an RTG any more, but still want to process refunds for a certain time period.

    1. Configure the RTG to have 0% traffic, but leave it active.