Giter VIP home page Giter VIP logo

Comments (3)

kylewest avatar kylewest commented on August 15, 2024

Can you share the code you are using? make sure to leave your account info out of it.

from dotnetshipping.

rlamunoz avatar rlamunoz commented on August 15, 2024

Sure! few minutes ago I ran this code 2 times and in one it display "FedEx Standard Overnight" and the next time it did not display that value. Thanks you!

using System;
using System.Collections.Generic;
using System.Configuration;
using DotNetShipping.ShippingProviders;

namespace DotNetShipping.SampleApp
{
    internal class Program
    {
        private static void Main()
        {
            var appSettings = ConfigurationManager.AppSettings;

            //// You will need a license #, userid and password to utilize the UPS provider.
            //var upsLicenseNumber = appSettings["UPSLicenseNumber"];
            //var upsUserId = appSettings["UPSUserId"];
            //var upsPassword = appSettings["UPSPassword"];

            // You will need an account # and meter # to utilize the FedEx provider.
            var fedexKey = appSettings["FedExKey"];
            var fedexPassword = appSettings["FedExPassword"];
            var fedexAccountNumber = appSettings["FedExAccountNumber"];
            var fedexMeterNumber = appSettings["FedExMeterNumber"];

            // You will need a userId to use the USPS provider. Your account will also need access to the production servers.
            //var uspsUserId = appSettings["USPSUserId"];

            // Setup package and destination/origin addresses
            var packages = new List<Package>();
            packages.Add(new Package(12, 12, 12, 35, 150));
            //packages.Add(new Package(4, 4, 6, 15, 250));

            var origin = new Address("Saint Petersburg", "FL", "33712", "US");
            var destination = new Address("Austin", "TX", "78759", "US"); // US Address
            //var destination = new Address("", "", "00907", "PR"); // Puerto Rico Address
            //var destination = new Address("", "", "L4W 1S2", "CA"); // Canada Address
            //var destination = new Address("", "", "SW1E 5JL", "GB"); // UK Address

            // Create RateManager
            var rateManager = new RateManager();

            // Add desired DotNetShippingProviders
            //rateManager.AddProvider(new UPSProvider(upsLicenseNumber, upsUserId, upsPassword) {UseProduction = false});
            rateManager.AddProvider(new FedExProvider(fedexKey, fedexPassword, fedexAccountNumber, fedexMeterNumber,false));
            //rateManager.AddProvider(new USPSProvider(uspsUserId));
            //rateManager.AddProvider(new USPSInternationalProvider(uspsUserId));

            // (Optional) Add RateAdjusters
            //rateManager.AddRateAdjuster(new PercentageRateAdjuster(.9M));

            // Call GetRates()
            var shipment = rateManager.GetRates(origin, destination, packages);

            // Iterate through the rates returned
            foreach (var rate in shipment.Rates)
            {
                Console.WriteLine(rate);
            }

            Console.ReadLine();
        }
    }
}

from dotnetshipping.

kylewest avatar kylewest commented on August 15, 2024

@rlamunoz have you been able to reproduce this? I ran your code about a dozen times and got the same results each time. only difference would be our FedEx account numbers. I'm going to close this for now. Please reopen if you can reproduce the conflicting rates.

screen shot 2015-11-30 at 1 23 17 pm

from dotnetshipping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.