Copied to clipboard

Flag this post as spam?

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


  • Neil Hodges 338 posts 987 karma points
    Feb 28, 2020 @ 14:21
    Neil Hodges
    0

    Stripe and Tea Commerce

    I have a website gone live today.

    Tested with Stripe locally with test card details and on the staging server with test card details and everything works as should. I get the transaction id in the back office and it looks like a successful payment.

    Testing on Live we've had 2 transactions gone through and both say -

    requires_payment_method
    

    from Stripes admin panel when I sign in to see the transaction details

    Worryingly the user gets redirected to the confirmation page But in the back office, no transaction id and stripe is saying 'incomplete'

    I've made sure were using the API Live keys, just as we've used the test keys.

    I'm unsure why this isn't wokring?

    I can't seem to find reference to a StripePayment form in Github, is there one?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 28, 2020 @ 15:39
    Matt Brailsford
    0

    Hi Neil,

    The StripePayment form can be found here

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

    Have you created a live webhook? and recorded your live webhook secret in the Stripe settings?

  • Neil Hodges 338 posts 987 karma points
    Feb 28, 2020 @ 17:31
    Neil Hodges
    0

    HI Matt

    Yeh, setup the webhook, added the Live key.

    Made sure we're using your Stripe Payment form.

    Just done another Live transaction and its come up in Stripe as 'incomplete'

    Starting to get some flack off the client for this, don't know why it would work on test and not with live credentials?

    Any ideas?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 28, 2020 @ 18:03
    Matt Brailsford
    0

    Hi Neil,

    Are you getting any errors in your event log?

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 28, 2020 @ 18:05
    Matt Brailsford
    0

    And have you set the provider settings to live mode + capture?

  • Neil Hodges 338 posts 987 karma points
    Feb 29, 2020 @ 08:20
    Neil Hodges
    0

    Hi Matt

    Yep set to ‘live’ mode and capture set to true.

    Does it need the webhook to work correctly? I don’t think the test one had the webhook setup but still worked and we got the transactionId.

    If so can I test this endpoint? With postman?

    We’ve set the site live, changed DNS over but it was previously on AWS using CloudFront.

    I’ve updated the DNS in AWS Route53 to point to our new Azure hosting. But the DNS is still using AWS name servers.

    I can see the site on my devices but had customers saying they see the old site. So my worry is that Stripe is pinging an endpoint and it can’t find it as it’s resolving the old website?

    Could it be related to that?

    I’ll download the log files today and see if that sheds any light.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 29, 2020 @ 09:01
    Matt Brailsford
    1

    Hi Neil,

    Yea, the webhook is essential as it is what finalizes the order giving it its transaction id and completing the order.

    If the webhook isn’t getting through then yea, that’s not going to completing the orders.

    The hard thing with testing the webhook is that the requests from stripe are time stamped and signed so quite hard to mock as there is only a small window they are valid.

    I think in stripe you might be able to see attempts to a webhook along with the status returned. Are you seeing these fail?

    Matt

  • Neil Hodges 338 posts 987 karma points
    Feb 29, 2020 @ 09:53
    Neil Hodges
    0

    Ah right Ok, I'll send another test purchase through on the Live site and see what the Event logs say on Stripe's end.

    Once this endpoint resolves, will Stripe ping Tea Commerce and complete the transaction? Even after a few days? I assume it just keeps trying until it gets a 200 response and can then set the transaction id?

    Edit: Just tested the webhook added to Stripe in Postman, I get a 200 response, but that's is coming from my machine I guess so not a true test.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 29, 2020 @ 10:52
    Matt Brailsford
    100

    Hey Neil,

    It should yea as long as it never revived a 200 response previously.

    “In live mode, Stripe attempts to deliver your webhooks for up to three days with an exponential back off. In the Events section of the Dashboard, you can view when the next retry will occur.

    In test mode, Stripe retries three times over a few hours. Webhooks cannot be manually retried after this time, though you can query for the event to reconcile your data with any missed events.”

    Re your test, yea, it at least tells you it’s responding but yea, it’s not really saying if it’s handling them ok.

  • Neil Hodges 338 posts 987 karma points
    Feb 29, 2020 @ 11:02
    Neil Hodges
    0

    enter image description here

    Stripe Webhook logs do have a recent 200 response.

    I've not re-tried it yet, as if I enable Stripe on the Live site someone may checkout. I may have to wait tonight to test on Live when traffic has died down to nothing.

    They can checkout with Pay Pal today, as I've just tested that and got a transaction id, so that's at least working Ok

  • Neil Hodges 338 posts 987 karma points
    Mar 05, 2020 @ 12:24
    Neil Hodges
    0

    For anyone reading this thread. The solution was that the DLLs were out of sync from Dev to Live.

    We upgraded Tea Commerce, made sure the correct version of DLLs were deployed to the server.

    We also had TeaCommerce.Providers.Stripe DLL in there for good measure which was causing problems as well. This was added by someone else on our team at the time and didn't tell us.

    So removing that DLL, updating TC fixed these issues with Stripe.

    Thanks to Matt for helping me debug for a number of hours, really appreciated #h5yr

Please Sign in or register to post replies

Write your reply to:

Draft