When evaluating a promotion, should the order not be linked to the currently selected payment type, the promotion is vetoed. All promotions are evaluated for possible vetoing. Vetoers are configured for each pricing engine, as described in the How Pricing Services Generate Prices section.
When evaluating tender-based promotions, the PaymentTypePromotionVetoer
class implements the prepareForVetoing
and vetoPromotion
methods to extract payment type information, and determine if the payment type is allowed for the current promotion. The PaymentTypePromotionVetoer
class is invoked through the pricing engines based on the configuration of the pricingModelEvaluationVetoers
property. In the following example, the pricingModelEvaluationVetoers
are set to SiteVetoer
and PaymentTypePromotionVetoer
:
$class=atg.commerce.pricing.MyPricingEngine qualifierService=QualifierService pricingModelEvaluationVetoers=SiteVetoer,PaymentTypePromotionVetoer calculatorTypeCalculators=\ standard=calculators/OrderDiscountCalculator
The PaymentTypePromotionVetoer
class uses two properties to determine how vetoing work. The boolean allowPartialPayment
property indicates if the payment type associated with the promotion must be used for full payment of the order. By default, this property is set to false
. If this property is set to true
, the order may contain other payment types, but must contain at least one payment type matching the payment types associated with the promotion.
The paymentTypeExclusionList
property is only relevant when the allowPartialPayment
property is set to false
. Payment types on this list are not considered when deciding if full payment was made using a designated payment type. For example, a shopper wishes to take advantage of a VISA-only promotion. The shopper also has some existing store credit that can partially pay for the order. If the allowPartialPayment
property is set to false
, and store credit has not been added to the paymentTypeExclusionList
, the shopper will not be able to use the VISA-only promotion if he wants to also use his store credit to pay for the order.
For additional information on tender-based promotion vetoing, refer to the Merchandising Administration Guide. For detailed information on the vetoer classes, refer to the ATG Platform API Reference.