Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Peck 690 posts 1896 karma points c-trib
    Feb 10, 2021 @ 11:51
    David Peck
    0

    Null reference creating an order

    I'm having problems with the Stripe payment provider. I can create an order when the country has the default payment provider of 'Invoice'. When I change it to Stripe, via the default for a country, I get the following exception (when I clear my cookies to force a new order creation).

    [NullReferenceException: Object reference not set to an instance of an object.]
    Vendr.PaymentProviders.Stripe.StripeCheckoutPaymentProvider.CanProcessOrder(OrderReadOnly order, StripeCheckoutSettings settings, String& errorMessage) +177
    Vendr.Core.Web.PaymentProviders.PaymentProviderBase`1.CanProcessOrder(OrderReadOnly order, IReadOnlyDictionary`2 settings, String& errorMessage) +147
    Vendr.Core.Web.Events.Validation.Handlers.Order.ValidatePaymentMethodPaymentProviderCanProcessOrder.Validate(ValidateOrderPaymentMethodChange evt) +671
    Vendr.Core.Events.Validation.ValidationEventHandlerBase`1.Handle(IEvent evt) +90
    Vendr.Core.Events.InProcEventDispatcher.Dispatch(IEnumerable`1 handlers, T evt) +106
    Vendr.Core.Events.EventBus.Dispatch(T evt) +252
    Vendr.Core.Models.AggregateBase`3.Validate(IValidationEvent validationEvent) +58
    Vendr.Core.Models.Order.SetPaymentMethod(Nullable`1 paymentMethodId) +528
    Vendr.Core.Models.<>c__DisplayClass10_0.<Create>b__0(Order x) +270
    Vendr.Core.Models.AggregateBase`3.QuietSet(Action`1 actions) +164
    Vendr.Core.Models.Order.Create(IUnitOfWork uow, OrderState state, String languageIsoCode, Guid currencyId, Guid taxClassId, Guid orderStatusId, Nullable`1 paymentMethodId, Nullable`1 paymentCountryId, Nullable`1 paymentRegionId, Nullable`1 shippingMethodId, Nullable`1 shippingCountryId, Nullable`1 shippingRegionId, String customerReference) +493
    Vendr.Core.Models.Order.Create(IUnitOfWork uow, Guid storeId, String languageIsoCode, Guid currencyId, Guid taxClassId, Guid orderStatusId, Nullable`1 paymentMethodId, Nullable`1 paymentCountryId, Nullable`1 paymentRegionId, Nullable`1 shippingMethodId, Nullable`1 shippingCountryId, Nullable`1 shippingRegionId, String customerReference) +392
    Vendr.Core.Session.SessionManager.GetOrCreateCurrentOrder(Guid storeId, String customerReference, Boolean checkAndMove) +9093
    Vendr.Core.Session.SessionManager.GetOrCreateCurrentOrder(Guid storeId) +133
    Vendr.Core.Api.CoreVendrApi.GetOrCreateCurrentOrder(Guid storeId) +82
    

    I've looked in Github, without any success. My guess would be that the order supplied as an argument is null, but the question then is why?.

    I've deleted the payment provider and recreated it. I believe the important setting fields are populated. Can you please advise how I should continue with my investigations? Do I need to start debugging the payment provider itself?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 10, 2021 @ 13:43
    Matt Brailsford
    100

    Hi David,

    This was reporting by someone else over slack a day or two ago. We'll be looking to get an update released by the end of the week.

    In the meantime, if it's holding you back, you can install the latest 1.4.3-beta build from our unstable nuget feed at https://nuget.outfield.digital/unstable/vendr/v3/index.json

    Matt

  • David Peck 690 posts 1896 karma points c-trib
    Feb 10, 2021 @ 14:42
    David Peck
    0

    Nice. Cracking service. Cheers.

Please Sign in or register to post replies

Write your reply to:

Draft