Copied to clipboard

Flag this post as spam?

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


  • Arne Sødal 12 posts 112 karma points
    Aug 16, 2019 @ 13:39
    Arne Sødal
    0

    Stipe webhook endpoint is rejected due to API version

    Stipe orders are not finalized after upgrading to TC 3.3.1, related to en Stripe webhook error.

    I have set up a webhook endpoint using Stripe API version 2019-08-14, but it looks like I have to use the API version 2019-05-16. The proble is that the API version 2019-05-16 is no longer an in my Stripe dashboard when adding a webhook endpoint . Is it possible to make the API version an option in the Tea Commerce pyment provider setup for Stripe?

    Error message: "Stripe.StripeException: Received event with API version 2019-08-14, but Stripe.net 3.1.7114 expects API version 2019-05-16. We recommend that you create a WebhookEndpoint with this API version. Otherwise, you can disable this exception by passing throwOnApiVersionMismatch=false to Stripe.EventUtility.ParseEvent or Stripe.EventUtility.ConstructEvent, but be wary that objects may be incorrectly deserialized. at Stripe.EventUtility.ParseEvent(String json, Boolean throwOnApiVersionMismatch)"

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Aug 17, 2019 @ 08:49
    Matt Brailsford
    0

    Hey Arne,

    Thanks for the detailed info.

    I think with the SCA changes from Stripe is causing some rapid updates to their API. Hopefully it's just a case of updating the DLL.

    I'll get this looked into next week and see if we can't get it updated.

    Matt

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Aug 17, 2019 @ 18:54
    Matt Brailsford
    0

    Hey Arne,

    Just to let you know, I've started development on this and have created a pull request for it on the Payment Providers GitHub repository. Still some testing to do, but if you wanted to try it out, I'd be glad of the feedback.

    https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/pull/31

    Many thanks

    Matt

  • Arne Sødal 12 posts 112 karma points
    Aug 19, 2019 @ 14:14
    Arne Sødal
    0

    Sounds good, thank you very much

  • Arne Sødal 12 posts 112 karma points
    Aug 27, 2019 @ 10:29
    Arne Sødal
    0

    Hi Matt

    Will there be a TC version 3.3.2 in time for the SCA changes on September 14?

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Aug 27, 2019 @ 10:38
    Matt Brailsford
    0

    Hi Arne,

    There will be yes. The PR here https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/pull/31 should be usable if you wanted to compile it and use it yourself if you are concerned about time. If it is built against the version of the API your Stripe account is configured to use then it will all be fine.

    I'm currently just waiting on a response from Stripe as I'm concerned there may be issues with them constantly updating the webhook endpoints such that it breaks the provider if you aren't on the specific provider built against a specific webhook version. We don't really want to be having version specific releases of the provider.

    Matt

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Aug 27, 2019 @ 18:32
    Matt Brailsford
    0

    Ok, as a bit of an update. I've spoken to Stripe and now know what we need to do to get it working.

    Ultimately, we need the payment provider to register the webhook endpoint automatically, rather than having people register them manually. By registering them via code, it can explicitly pass an API version to use and so it ensures it's always notified using the specific API version.

    I've added some notes to the PR about what this ultimately means / involves https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/pull/31#issuecomment-525426739

    I need to do some more testing before release, but hopefully this will resolve the issue.

    Matt

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Sep 02, 2019 @ 13:38
    Matt Brailsford
    100

    Ok, I've released a new version of TC with the updated Stripe provider in it https://our.umbraco.com/packages/website-utilities/tea-commerce/

    Please read the docs on the Stripe provider as how it is setup has changed https://docs.teacommerce.net/3.3.2/payment-providers/stripe/#configure-stripe

  • Arne Sødal 12 posts 112 karma points
    Sep 03, 2019 @ 07:17
    Arne Sødal
    0

    Thank you :)

  • Arne Sødal 12 posts 112 karma points
    Sep 05, 2019 @ 12:05
    Arne Sødal
    0

    I noticed a small error in the Stripe payment solution. If you submit the wrong CVC code and then resubmit with the correct CVC , I get a system error:

    > ERROR TeaCommerce.Api.Web.FormPostHandler - FormPost error  --- Form
    > data:  -- RemoveOrderLine = "orderLineId : orderLineId"  -- storeId =
    > "2"  -- orderLineId = "696"
    > 
    > System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY
    > KEY constraint 'PK_TeaCommerce_CustomProperty'. Cannot insert
    > duplicate key in object 'dbo.TeaCommerce_CustomOrderProperty'. The
    > duplicate key value is (958cdd55-4cc8-46a8-a9e5-e9cdeb185600,
    > stripePaymentIntentId). The statement has been terminated.
    

    After this has occurred, it is impossible to submit the order, and it is not possible to empty the shopping cart either. Have to delete TC cookies and add item to cart again.

    Apart from this, everything seems to be working properly :)

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Sep 05, 2019 @ 12:52
    Matt Brailsford
    0

    Shoot! You are right. I believe it's essentially this line that should be AddOrUpdate not Add

    https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/blob/master/Source/TeaCommerce.PaymentProviders.Stripe/Stripe.cs#L180

    Damn it! I'll have to look at getting it recompiled and re-released 🤦‍♂️

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Sep 05, 2019 @ 12:57
    Matt Brailsford
    0

    I've recompiled the PaymentProviders DLL if you want to give this a try:

    https://www.dropbox.com/s/lldps75zx6sz8am/TeaCommerce.PaymentProviders.dll.20190905.1356.zip?dl=0

    Matt

  • Arne Sødal 12 posts 112 karma points
    Sep 05, 2019 @ 12:58
    Arne Sødal
    0

    This also happens if a customer double-click the payment form submit button (It takes a few seconds after clicking, so an impatient customer often clicks again), The first click goes through, while the second fails and the order is not approved, but the payment goes through. Maybe the button should be disable for a few seconds after the first click?

  • Arne Sødal 12 posts 112 karma points
    Sep 05, 2019 @ 13:01
    Arne Sødal
    0

    I will test

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Sep 05, 2019 @ 13:03
    Matt Brailsford
    0

    RE disabling the button, we do provide placeholders for code to do this (and recently added template code to do this) however as people modify this code it tends to be up to the implementer to ensure the button becomes disabled.

    https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/blob/master/Source/TeaCommerce.PaymentProviders.UI/Views/Partials/StripePaymentForm.cshtml#L138

    Matt

  • Arne Sødal 12 posts 112 karma points
    Sep 05, 2019 @ 13:12
    Arne Sødal
    0

    Ok, i understand about the button bocomes disabled.

    Resending with corrected CVC seems to be working fine now, so the recompiled dll is working fine.

    Thanks for the quick response.

  • Matt Brailsford 4123 posts 22194 karma points MVP 9x c-trib
    Sep 05, 2019 @ 13:13
    Matt Brailsford
    1

    Cool, thanks for testing.

    I'll have to re-release TC again with a patch version, but the only difference will be that DLL so you shouldn't have to update it.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft