public bool ShippingAddressDoesNotMatchBillingAddress(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedShippingAddress != null && context.Selections.SelectedBillingAddress != null && context.Selections.SelectedBillingAddress.AddressID != 0 && context.Selections.SelectedBillingAddress.AddressID != context.Selections.SelectedShippingAddress.AddressID); }
public bool ShippingAddressRequired(CheckoutEngine.StateMachineContext context) { return(!context.ShoppingCart.IsAllDownloadComponents() && !context.ShoppingCart.IsAllSystemComponents() && !context.ShoppingCart.NoShippingRequiredComponents() && !context.ShoppingCart.IsAllEmailGiftCards()); }
public bool CartContainsGiftCard(CheckoutEngine.StateMachineContext context) { return(context .ShoppingCart .CartItems .Where(cartItem => GiftCard.ProductIsEmailGiftCard(cartItem.ProductID)) .Any()); }
public bool CreditCardDetailsMissing(CheckoutEngine.StateMachineContext context) { if (AppLogic.ActivePaymentGatewayCleaned() == Gateway.ro_GWBRAINTREE) { return(context.Selections.Braintree == null); } else { return(context.Selections.CreditCard == null); } }
public bool GiftCardSetupComplete(CheckoutEngine.StateMachineContext context) { return(context .ShoppingCart .CartItems .Where(cartItem => GiftCard.ProductIsEmailGiftCard(cartItem.ProductID)) .Select(cartItem => GiftCardManager.LoadByShoppingCartRecordId(cartItem.ShoppingCartRecordID)) .All(giftCard => giftCard != null && !string.IsNullOrWhiteSpace(giftCard.EMailName) && !string.IsNullOrWhiteSpace(giftCard.EMailTo))); }
public bool BillingAddressRequired(CheckoutEngine.StateMachineContext context) { if (context.ShoppingCart.Total(true) == decimal.Zero && context.ShoppingCart.IsAllDownloadComponents()) { return(false); } return(context.Selections.SelectedPaymentMethod == null || context.Selections.SelectedPaymentMethod.RequiresBillingSelection); }
public bool ShippingMethodIsValid(CheckoutEngine.StateMachineContext context) { if (context.Selections.SelectedShippingMethodId == null) { return(false); } var shippingMethods = CachedShippingMethodCollectionProvider.Get(context.Customer, context.Selections.SelectedShippingAddress, context.ShoppingCart.CartItems, context.StoreId); return(shippingMethods .Select(shippingMethod => shippingMethod.Id) .Contains(context.Selections.SelectedShippingMethodId.Value)); }
public bool ShippingMethodRequired(CheckoutEngine.StateMachineContext context) { if (context.ShoppingCart.IsAllFreeShippingComponents() && !AppLogic.AppConfigBool("FreeShippingAllowsRateSelection")) { return(false); } return(context.ShoppingCart.CartAllowsShippingMethodSelection && !context.ShoppingCart.IsAllSystemComponents() && !context.ShoppingCart.IsAllDownloadComponents() && !context.ShoppingCart.NoShippingRequiredComponents() && !context.ShoppingCart.IsAllEmailGiftCards()); }
public bool RecurringScheduleMismatchOnItems(CheckoutEngine.StateMachineContext context) { return(context.ShoppingCart.RecurringScheduleConflict); }
public bool CartItemsLessThanMinimumItemCount(CheckoutEngine.StateMachineContext context) { return(!context.ShoppingCart.MeetsMinimumOrderQuantity(context.Configuration.MinCartItemsBeforeCheckout)); }
public bool CartItemsGreaterThanMaximumItemCount(CheckoutEngine.StateMachineContext context) { return(context.ShoppingCart.ExceedsMaximumOrderQuantity(context.Configuration.MaxCartItemsBeforeCheckout)); }
public bool TermsAndConditionsRequired(CheckoutEngine.StateMachineContext context) { return(context.Configuration.RequireTermsAccepted); }
public bool SubtotalDoesNotMeetMinimumAmount(CheckoutEngine.StateMachineContext context) { return(!context.ShoppingCart.MeetsMinimumOrderAmount(context.Configuration.CartMinOrderAmount)); }
public bool PaymentMethodPresent(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod != null && !string.IsNullOrEmpty(context.Selections.SelectedPaymentMethod.Name)); }
public bool BillingAddressPresent(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedBillingAddress != null && context.Selections.SelectedBillingAddress.AddressID != 0); }
public bool PaymentMethodIsPurchaseOrder(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod != null && context.Selections.SelectedPaymentMethod.Name == AppLogic.ro_PMPurchaseOrder); }
public bool PaymentMethodIsCreditCard(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod != null && context.Selections.SelectedPaymentMethod.Name == AppLogic.ro_PMCreditCard); }
public bool PaymentMethodIsMicroPay(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod != null && context.Selections.SelectedPaymentMethod.Name == AppLogic.ro_PMMicropay); }
public static bool AmazonPaymentsDetailsMissing(CheckoutEngine.StateMachineContext context) { return(context.Selections.AmazonPayments == null); }
public static bool PaymentMethodIsAmazonPayments(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod != null && context.Selections.SelectedPaymentMethod.Name == AppLogic.ro_PMAmazonPayments); }
public bool PaymentMethodIsPayPalExpress(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod != null && context.Selections.SelectedPaymentMethod.Name == AppLogic.ro_PMPayPalExpress); }
public bool TermsAndConditionsNotAccepted(CheckoutEngine.StateMachineContext context) { return(!context.Selections.TermsAndConditionsAccepted); }
public bool PaymentMethodRequired(CheckoutEngine.StateMachineContext context) { return(!(context.ShoppingCart.Total(true) == 0 && context.Configuration.SkipPaymentEntryOnZeroDollarCheckout) && !context.ShoppingCart.GiftCardCoversTotal()); }
public bool CustomerAccountRequired(CheckoutEngine.StateMachineContext context) { var checkoutAccountStatus = CheckoutAccountStatusProvider.GetCheckoutAccountStatus(context.Customer, context.Selections.Email); return(checkoutAccountStatus.State == CheckoutAccountState.Unvalidated); }
public bool MicroPayBalanceIsInsufficient(CheckoutEngine.StateMachineContext context) { return(context.ShoppingCart.Total(true) > context.Customer.MicroPayBalance); }
public bool Always(CheckoutEngine.StateMachineContext context) { return(true); }
public bool BillingAddressRequired(CheckoutEngine.StateMachineContext context) { return(context.Selections.SelectedPaymentMethod == null || context.Selections.SelectedPaymentMethod.RequiresBillingSelection); }
public bool ShoppingCartIsEmpty(CheckoutEngine.StateMachineContext context) { return(context.ShoppingCart.IsEmpty()); }
public bool ShippingAddressMustMatchBillingAddress(CheckoutEngine.StateMachineContext context) { return(!AppConfigProvider.GetAppConfigValue <bool>("AllowShipToDifferentThanBillTo")); }
public bool PurchaseOrderDetailsMissing(CheckoutEngine.StateMachineContext context) { return(context.Selections.PurchaseOrder == null); }