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.
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
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.
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).
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.
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?
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.
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
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?
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/
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
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.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.
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.
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).
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
Matt, let me test his this theory before we officially mark resolved
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?
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.
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.
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
is working on a reply...