Subversion Repositories SmartDukaan

Rev

Rev 3209 | Rev 3616 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3209 Rev 3561
Line 80... Line 80...
80
            
80
            
81
            long cartId = userinfo.getCartId();
81
            long cartId = userinfo.getCartId();
82
                  
82
                  
83
            // Validate the cart to ensure that we are not accepting payment for
83
            // Validate the cart to ensure that we are not accepting payment for
84
            // an invalid order.
84
            // an invalid order.
85
            errorMsg = userClient.validateCart(cartId);
85
            errorMsg = userClient.validateCart(cartId, sourceId);
86
            
86
            
87
 
87
 
88
            Cart cart = userClient.getCart(cartId);
88
            Cart cart = userClient.getCart(cartId);
89
            setTotalAmount(cart);
89
            setTotalAmount(cart);
90
            itemIdString = Utils.getItemIdStringInCart(cart);
90
            itemIdString = Utils.getItemIdStringInCart(cart);
Line 108... Line 108...
108
        
108
        
109
        try {
109
        try {
110
            CatalogClient catalogServiceClient  = new CatalogClient();
110
            CatalogClient catalogServiceClient  = new CatalogClient();
111
            in.shop2020.model.v1.catalog.InventoryService.Client catalogClient = catalogServiceClient.getClient();
111
            in.shop2020.model.v1.catalog.InventoryService.Client catalogClient = catalogServiceClient.getClient();
112
            for (Line line : lineItems) {
112
            for (Line line : lineItems) {
113
                Item item = catalogClient.getItem(line.getItemId());
113
                Item item = catalogClient.getItemForSource(line.getItemId(), sourceId);
114
                if(item.getSellingPrice() > COD_CUTOFF_AMOUNT)
114
                if(item.getSellingPrice() > COD_CUTOFF_AMOUNT)
115
                    showCodOption = false;    
115
                    showCodOption = false;    
116
            }
116
            }
117
        } catch(Exception e) {
117
        } catch(Exception e) {
118
            logger.error("Error while getting item info from the catalog service", e);
118
            logger.error("Error while getting item info from the catalog service", e);