Copied to clipboard

Flag this post as spam?

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


  • Kyle Eck 130 posts 280 karma points
    Jan 20, 2022 @ 21:36
    Kyle Eck
    0

    Vendr Checkout with Stripe Continue Url on SSL

    Matt,

    I am progressing through to process payments, however when I go through the steps and get to the hosted stripe checkout and enter a card etc. and hit Pay, it should redirect me back to the confirmation url.

    However the url ends up being

    https://<my-domain>:80/umbraco/vendr/payment/continue/stripe-checkout/3f129248-d452-492c-a453-017e7951105d/ORDER-00751-77684-VQQDS/d73407c60fa2618a5fe10782a274e55bb613f0b0398b3604471466a91a8d59eb
    

    I am on an SSL cert and not a regular http binding of port :80

    Furthermore I don't see a finalized order in the order dashboard, but stripe has taken and captured payments and everything is kosher for them.

    Am I missing something trivial here?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 21, 2022 @ 09:08
    Matt Brailsford
    0

    Hi Kyle,

    What version of Vendr are you using? Do you have anything specific in place around the URLs? CLoudflare or something?

    Vendr should capture the current URL + Port when creating those URL's so for some reason it's not picking up the port correctly.

    RE finalization, with Stripe finalization only occurs via a webhook so you won't see orders being finalized until your webhook is in place. Please review the Stripe docs here https://vendr.net/docs/payment-providers/stripe/2.0.0/stripe-checkout/

  • Kyle Eck 130 posts 280 karma points
    Jan 21, 2022 @ 10:25
    Kyle Eck
    0

    Matt,

    Yes I sit behind cloudflare and I’m using Vendr 2.0.0 or 2.0.1 I don’t recall off the top of my head, apologies for that

    I have my test webhook in place and thought that I would see finalized orders regardless of it being a test or live webhook. I have followed the stripe documents to set this up, with the exception of specifically setting up live urls for now as the only difference is the keys

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 21, 2022 @ 10:29
    Matt Brailsford
    0

    Hey Kyle,

    You should see webhooks coming through yes so you might want to check the Stripe portal to see what notifications have been sent and whether they were handled.

    Would I be right in guessing that you are using Cloudflares flexible SSL? Meaning Cloudflare is making http based requests to your server and it's only from the browser to Cloudflare that things are HTTPs?

    If so, I think this might be the problem 🤔

    UPDATE Just reviewing our code, if you can get Cloudflare to set the X-Forwarded-Port header to 443, this should actually force the URL's to be generated on correct port. I'm not entirely sure how you get Cloudflare to set additional headers though.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 21, 2022 @ 10:45
    Matt Brailsford
    0

    Looking at Cloudflares docs, we might need to check for the CF-Visitor header and parse the JSON to see if it's a https request.

    I wouldn't normally like to add platform specific code into Vendr though, but I suppose CF is fairly common these days.

  • Kyle Eck 130 posts 280 karma points
    Jan 21, 2022 @ 10:50
    Kyle Eck
    0

    Matt addressing your question about cloudflare and ssl

    The ssl is all the way through the pipeline, not just from browser to cloudflare, it’s using let’s encrypt to be issued etc.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 21, 2022 @ 10:54
    Matt Brailsford
    0

    Ok, then that is weird as this should mean that CF is making https based requests to the site and so Vendr should see the correct scheme being used (we have this very setup for getkonstrukt.net and it seems to be resolving fine there).

  • Kyle Eck 130 posts 280 karma points
    Jan 21, 2022 @ 11:05
    Kyle Eck
    0

    Yeah I thought it seemed odd as checking for ssl was something I was sure was not missed.

    I just had my hosting provider look over everything and ever is setup appropriately for both the main domain and staging subdomain

    My stripe webhook does reference the sub domain however this is also protected via password. Which now that I think about it, I may have just answered my question and wasted your time.

    I’m thinking the webhook can’t reach the site due to cloudflare password protecting it so that only certain emails have access.

    Ugh, I’m sorry Matt

  • Kyle Eck 130 posts 280 karma points
    Jan 21, 2022 @ 11:17
    Kyle Eck
    1

    Matt, let me test his this theory before we officially mark resolved

  • Kyle Eck 130 posts 280 karma points
    Jan 21, 2022 @ 11:28
    Kyle Eck
    0

    Ok just tested this and it’s working without a password protection and the cloudflare being on full now, hosting did in fact have this set to flexible…

    All good, sorry for wasting your time.

    One other quick question for you though, when using stripe, should the cost be zero all the time? For example is the cost for stripe simply something if the site wants to charge the customer to make up for the stripe percentage they take per transaction?

    Does that make sense?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 21, 2022 @ 14:26
    Matt Brailsford
    0

    Hey Kyle,

    That's great. I have actually just added code to allow flexible ssl to work so hopefully that might help others later anyways.

    RE payment method costs, that's correct. The cost is what you want to charge the customer for using that payment method. It's not meant to be the percentage fee from stripe or anything. So most of the time, it will be zero yes.

  • Kyle Eck 130 posts 280 karma points
    Jan 21, 2022 @ 14:34
    Kyle Eck
    0

    Matt,

    Thanks for that, is there a way to essentially say something like the following:

    "If the price for the payment method is 0 or null, dont show the amount on the payment method step"

    Thanks.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 21, 2022 @ 14:42
    Matt Brailsford
    0

    Hi Kyle,

    Not in Vendr Checkout OOTB. You'd need to run a custom template file and add in the code to do that.

    Feel free to raise that on our issue tracker or even better submit a PR and I'll see what we can do about making it configurable.

    https://github.com/vendrhub/vendr-checkout/issues

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft