In which cases are CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture expected to reflect the Litium assortment and web site culture rather than the default values of the current thread?
I notice that when Litium.Foundation.Modules.ECommerce.Plugins.Payments.PaymentInfoRowFactory.PaymentInfoRowFactory.Create() is called as part of the checkout during the request to “/site.axd/QliroPayment/Confirmation” CultureInfo.CurrentUICulture is not e.g. “sv-SE” as I’d expect but “en-GB” which is what my OS is set to. This causes an exception.
Yes, that is expected behavior, the /site.axd/* is not going through Litium’s routing and then the culture information (or the RouteRequestInfo) will not be set.
Litium.IWebLog - IWebLog exception 'Object reference not set to an instance of an object.': 71fd85f4-14b5-4cc9-b07c-ac25448a5d1c System.NullReferenceException: Object reference not set to an instance of an object.
at Litium.Foundation.Modules.ECommerce.Plugins.Payments.PaymentInfoRowFactory.Create(OrderCarrier orderCarrier, SecurityToken token)
at Litium.Foundation.Modules.ECommerce.Plugins.Payments.PaymentInfoCalculator.CalculateFromCarrier(OrderCarrier orderCarrier, SecurityToken token)
at Litium.Accelerator.Services.Payments.QliroPaymentService.<ValidateAndReSetOrderCarrierFromQliro>g__ReCalculatePaymentInfo|15_1(ILitiumQliroOneOrder& order) in src\Litium.Accelerator\Services\Payments\QliroPaymentService.cs:line 294
at Litium.Accelerator.Services.Payments.QliroPaymentService.ValidateAndReSetOrderCarrierFromQliro(ILitiumQliroOneOrder checkoutOrder, Boolean& hasOrderMismatch) in src\Litium.Accelerator\Services\Payments\QliroPaymentService.cs:line 330
at Litium.Accelerator.Services.Payments.QliroPaymentService.PlaceOrder(String accountId, String merchantReference, Boolean isConfirmation) in src\Litium.Accelerator\Services\Payments\QliroPaymentService.cs:line 160
at Litium.Accelerator.Mvc.Controllers.Checkout.QliroPaymentController.Confirmation(String accountId, String merchantReference) in src\Litium.Accelerator.Mvc\Controllers\Checkout\QliroPaymentController.cs:line 40