Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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.
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.
var session = await sessionService.CreateAsync(sessionOptions);
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.
var session = sessionService.Create(sessionOptions);
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)
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?
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
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.
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.
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.
Just to let you know, both of these updates have now been released on the public NuGet feed 👍
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted