Copied to clipboard

Flag this post as spam?

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


  • Jason Larcombe 8 posts 28 karma points
    Oct 11, 2021 @ 12:46
    Jason Larcombe
    0

    Stripe payment provider 2.0.0

    Hi Matt,

    Happy to be building another Vendr site, trying out v2.0.0 and loving it, just having a few issues with the Stripe payment provider atm.

    I'm using:

    • Umbraco 8.17.0
    • Vendr 2.0.0
    • Vendr.PaymentProviders.Stripe 2.0.0
    • Vendr.Checkout 2.0.0

    First issue I came across relates to BeginPaymentForm. The call to var session = await sessionService.CreateAsync(sessionOptions); in the Stripe payment provider's GenerateFormAsync method just never seems to return. So we hang on proceeding to the review step of checkout until it times out.

    To get around this (to check the rest of the Stripe payment provider) I changed this to the synchronous version var session = sessionService.Create(sessionOptions); and we can then proceed to the review step of the checkout.

    We can then make payment in Stripe test mode and get redirected to the order confirmation page. However, the checkout.session.completed webhook isn't happy at all. The error i'm seeing in the Stripe webhooks logs:

    <Error><Message>An error has occurred.</Message><ExceptionMessage>Object reference not set to an instance of an object.</ExceptionMessage><ExceptionType>System.NullReferenceException</ExceptionType><StackTrace> at Vendr.Core.PaymentProviders.PaymentProviderContextFactory.CreateContext(OrderReadOnly order, PaymentMethodReadOnly paymentMethod, HttpRequestMessage request) at Vendr.Umbraco.Web.Controllers.VendrPaymentController.&lt;HandleRequestWithoutOrder&gt;d__19.MoveNext()

    Orders do not appear (even in an Error state) in the orders section and there's nothing in my logs so i'm at a bit of a dead end. There's nothing particularly fancy about our Vendr implementation; Umbraco nodes as products. Wondering if you or anyone else has come across these issues with version 2.0.0 of the Stripe payment provider?

    Thanks, Jason

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 11, 2021 @ 13:44
    Matt Brailsford
    0

    Hey Jason,

    OK so issue one sounds like it'll be an async deadlock issue. Whilst I've made the GenerateForm methods of the payment provider async, I've currently had to keep the BeginPaymentForm methods synchronous and so it looks like this is deadlocking. I'll need to look into this and test it a little further.

    RE CreateContext error I'm not entirely sure what could be null there. I'll have to setup some tests and see.

    Let me get a test environment setup with the Stripe provider and I'll see if I can replicate things

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 11, 2021 @ 15:23
    Matt Brailsford
    0

    Ok, so I managed to replicate this and I believe I have a fix. I've push it to our unstable feed which you can setup as a custom NuGet source at https://nuget.outfield.digital/unstable/vendr/v3/index.json

    There is a Vendr 2.0.1 build as well as a Stripe provider 2.0.1 build on there now.

  • Jason Larcombe 8 posts 28 karma points
    Oct 11, 2021 @ 16:45
    Jason Larcombe
    0

    I've just installed Vendr 2.0.1-beta and the Stripe payment provider 2.0.1-beta builds from your unstable feed. Running through testing, from what I can tell both issues seem to be resolved 😁 no more deadlock and webhooks seem happy!

    Cheers for looking in to this, much appreciated.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 11, 2021 @ 16:54
    Matt Brailsford
    0

    No problem at all, thanks for reporting the issues and taking the time to test the fix. 🙏

    I’ll give it a few days before I release an update just to see if anymore v2 issues crop up.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 20, 2021 @ 08:13
    Matt Brailsford
    1

    Just to let you know, both of these updates have now been released on the public NuGet feed 👍

Please Sign in or register to post replies

Write your reply to:

Draft