When I have only "By country and weight" it works; When I have both "By country and weight" and Canada Post it gives me "Request for the permission of type 'System.Net.SocketPermission ... " error When I have only Canada Post it gives me "Shipping options could not be loaded"
I have no country restrictions, and I have two shipping methods.
It's version 1.6 on GoDaddy. What should I do to resolve the problem?
No, nothing. I decided to wait when Godaddy upgrades to 1.8 or 1.9. Hopefully there the issue is resolved. If not, I will have to go and try changing the code myself (by accident I am an ASP.NET programmer). It's just I didn't want to interfere with the GoDaddy's way of maintaining this app.
Otherwise, I tried all meaningful ways of making it work... No success.
Eventually I upgraded to 1.9 manually. I changed some code to make it work though. The problem wasn't that bad, but still, when I chose countries where there were no states or provinces, nopcommerce gave me an error... So I did a workaround - I let it send whatever info there is to Canada Post and should there be an error- let it be coming from them, but not from Nopcommerce. They seem to have overprotected it...
// // error = "Shipping state is not set"; // //return shippingOptions;
//}
try { var profile = new Profile(); //use "CPC_DEMO_XML" merchant ID for testing profile.MerchantId = IoC.Resolve<ISettingManager>().GetSettingValue("ShippingRateComputationMethod.CanadaPost.CustomerID");
var destination = new Destination(); destination.City = shipmentPackage.ShippingAddress.City; // here is where we're feeding Canada Post with province data: if (shipmentPackage.ShippingAddress.StateProvince == null) destination.StateOrProvince = string.Empty; else destination.StateOrProvince = shipmentPackage.ShippingAddress.StateProvince.Abbreviation; destination.Country = shipmentPackage.ShippingAddress.Country.TwoLetterIsoCode; destination.PostalCode = shipmentPackage.ShippingAddress.ZipPostalCode;