Payment Director allows a store owner to conditionally determine which payment methods to show the customer and to calculate additional payment fees. Let’s start with the basics…
By default, all Payment Methods that are marked Active in admin > Configuration > Payment Methods are available to your customers. Then, you set up Payment Director Option records as needed to hide options and calculate fees. Each option’s Expression field is evaluated, and if ‘true’ (or ‘Show’) then the option will be presented to the customer. If ‘false’ (or ‘Hide’), then the payment option is removed. You can include an Option record for all your active payment methods, but if only some are conditional, then it’s easiest to just have Option records for those; if an active payment method is not included in payment director, then it will automatically be shown to the customer.
Here are some example scenarios for offering payment methods, and their Option records/expressions:
Offer 'payment in store' method only when "In-Store Pickup" shipping method selected:
Option Payments.PayInStore ShippingOptionName = "In-Store Pickup"
Local Deliveries can include CashOnDelivery:
Option Payments.CashOnDelivery Customer.ShippingAddress.ZipPostalCode.StartsWith("100")
Customers in role "Members" can include PurchaseOrder (use the role's System Name):
Option Payments.PurchaseOrder Customer.IsInCustomerRole("Members")
If an admin is impersonating a Customer, then use Manual Credit Card, otherwise the customer enters a credit card that Authorize.Net will process:
Option Payments.Manual OriginalCustomerIfImpersonated != null
Option Payments.AuthorizeNet OriginalCustomerIfImpersonated = null
Only offer Paypal if a FedEx shipping method was selected (a method that has tracking :)
Option Payments.PayPalStandard ShippingOptionName.StartsWith("FedEx")
Only offer credit card if there are no Gift Cards in the cart
Option Payments.Manual NOT Items.Any(Product.IsGiftCard)
When entering records in the Add new 'Payment Director' record dialog, select Option in the Type field drop down, and then the Payment Name field will present a drop down with only active payment methods.
Then, enter an expression that evaluates to a Boolean (true or false) using one or more or more of the following operands:
(UPDATE: Here are more operands added added from 3.60 and on)
Here are some examples:
We'll introduce more features in the next blog :)
Right now we have items that cannot be purchased with PayPal, the director recognizes these items by a parent category and other category's in which we no long use, is it possible to chance how it recognizes this items to key words, like the word "dagger" so that any item on our site that uses the word dagger can no longer be purchased through PayPal option?
Thanks
Yes, we can adjust the configuration. We'll contact you from our ticket system.