Paypal Express Plugin 4.2

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 năm cách đây
The following code which is present if you check out with normal payment methods is not available with the about plugin which provides a button at the bottom of the cart.

        public virtual IActionResult StartCheckout(IFormCollection form)
        {
            var cart = _shoppingCartService.GetShoppingCart(_workContext.CurrentCustomer, ShoppingCartType.ShoppingCart, _storeContext.CurrentStore.Id);

            //parse and save checkout attributes
            ParseAndSaveCheckoutAttributes(cart, form);

            //validate attributes
            var checkoutAttributes = _genericAttributeService.GetAttribute<string>(_workContext.CurrentCustomer,
                NopCustomerDefaults.CheckoutAttributes, _storeContext.CurrentStore.Id);
            var checkoutAttributeWarnings = _shoppingCartService.GetShoppingCartWarnings(cart, checkoutAttributes, true);
            if (checkoutAttributeWarnings.Any())
            {
                //something wrong, redisplay the page with warnings
                var model = new ShoppingCartModel();
                model = _shoppingCartModelFactory.PrepareShoppingCartModel(model, cart, validateCheckoutAttributes: true);
                return View(model);
            }

As a result if you checkout with paypal express it does not validate your required checkout attributes when the page is editable at the start.  

Steve.
4 năm cách đây
Anyone else having issues with Checkout Attribute validation with the Paypal Express Plugin?  The silence is deafening and looking at the code to the best of my ability, I can't see any validation allowing the user to correct required fields.

Steve.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.