public Shipment CalculateShipping(Order order) {

            Shipment result = new Shipment(order);
            result.ShippingOptions = new List<ShippingMethod>();
            result.ShippingOptions.Add(new ShippingMethod(1,"Test Carrier", "Overnight", 10, 1,5));
            result.ShippingOptions.Add(new ShippingMethod(2,"Test Carrier", "Next Day", 5, 2,10));
            result.ShippingOptions.Add(new ShippingMethod(3,"Test Carrier", "Ground", 2,  5,20));
            return result;
        }
Exemple #2
0
        bool AmountPaidIsValid(Order order, decimal amountPaid) {

            //pull the order
            bool result = true;

            if (order != null) {
                if (order.Total > amountPaid) {
                    //_logger.Warn("Invalid order amount to PDT/IPN: " + order.ID + "; Actual: " + amountPaid.ToString("C") + "; Should be: " + order.Total.ToString("C") + "user IP is " + Request.UserHostAddress);
                    result = false;
                }
            } else {
                //_logger.Warn("Invalid order ID passed to PDT/IPN; user IP is " + Request.UserHostAddress);
            }
            return result;

        }