Copied to clipboard

Flag this post as spam?

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


  • Nick Hoang 51 posts 180 karma points
    Apr 10, 2023 @ 17:07
    Nick Hoang
    0

    Stripe payment provider questions

    Hi,

    I'm using Umbraco 8 + Vendr 1.8 and following this docs to integrate Stripe payment provider to our project: https://vendr.net/docs/payment-providers/stripe/1.1.0/stripe-checkout/. Everything works fine except I don't see any orders in the CMS (Commerce section) and no error logs, so questions are:

    1. Is the order created right after the payment done at Stripe checkout and redirect back to the confirmation page? or after webhook called back?
    2. How to create the order in the CMS even the Stripe checkout failed (I will send email to customer to ask he try another payment method)?

    Thanks, Nick

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Apr 10, 2023 @ 17:27
    Matt Brailsford
    0

    Sounds like your Stripe webhook isn’t set up correctly. I’d double check the docs around this, and if testing locally also follow the docs on setting up ngrok.

  • Nick Hoang 51 posts 180 karma points
    Apr 10, 2023 @ 17:34
    Nick Hoang
    0

    Hi Matt,

    You're right, Stripe webhook failed and I can see the order in the database but it doesn't show up in the CMS, is there any way to show the incomplete (payment failed) orders in the CMS?

    And here's the exception of the webhook handler:

    System.ArgumentNullException: String reference not set to an instance of a String.

    Parameter name: s

    at System.Text.Encoding.GetBytes(String s)

    at Stripe.EventUtility.ComputeSignature(String secret, String timestamp, String payload) in /_/src/Stripe.net/Services/Events/EventUtility.cs:line 194

    at Stripe.EventUtility.ValidateSignature(String json, String stripeSignatureHeader, String secret, Int64 tolerance, Int64 utcNow) in /_/src/Stripe.net/Services/Events/EventUtility.cs:line 143

    at Stripe.EventUtility.ValidateSignature(String json, String stripeSignatureHeader, String secret, Int64 tolerance) in /_/src/Stripe.net/Services/Events/EventUtility.cs:line 134

    at Vendr.PaymentProviders.Stripe.StripePaymentProviderBase`1.GetWebhookStripeEvent(HttpRequestBase request, String webhookSigningSecret)

    Cheers, Nick

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Apr 12, 2023 @ 06:54
    Matt Brailsford
    0

    Hi Nick,

    I newer versions of Vendr (v3+) we do have a new carts section that would show unfinalized orders.

    The error seems interesting as it looks like it's failed to validate the Stripe webhook signature, which I'm not sure why that would happen.

    Best I could suggest would be to check your webhook settings and if they are all setup correctly, maybe pull the source for the Stripe provider and see why it seems to be failing https://github.com/vendrhub/vendr-payment-provider-stripe

  • Nick Hoang 51 posts 180 karma points
    Apr 13, 2023 @ 02:02
    Nick Hoang
    0

    Thanks Matt, I sorted it out.

    I newer versions of Vendr (v3+) we do have a new carts section that would show unfinalized orders.

    -> unfortunately that I'm using Umbraco 8 atm so should I try to rebuild the order dashboard for this requirement?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Apr 13, 2023 @ 05:12
    Matt Brailsford
    0

    Hey Nick.

    That’s your call really as it’d be a fair bit of work. I’d probably suggest digging into why the webhook is failing first. When they work it’s usually pretty reliable so I’m not sure your custom dashboard would be that necessary once the error is resolved.

  • Nick Hoang 51 posts 180 karma points
    Apr 13, 2023 @ 05:20
    Nick Hoang
    0

    Hi Matt,

    ah, I meant the webhook issue has been fixed but the case of incomplete order still make me stress. Do you have raw idea about where's the starting point that I should start for the new order dashboard?

    Thanks, Nick

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Apr 13, 2023 @ 09:05
    Matt Brailsford
    100

    Ahh, cool

    I guess the simplest option could be to produce a dashboard that lists orders that have an "Initialized" payment status that hasn't been updated in 10 minutes or so. This would be a good indication of an order that started the payment process but didn't complete.

  • Nick Hoang 51 posts 180 karma points
    Apr 13, 2023 @ 12:02
    Nick Hoang
    0

    Thanks for you help, I will give it a go

Please Sign in or register to post replies

Write your reply to:

Draft