#normanlove - prod vs test
1 messages ยท Page 1 of 1 (latest)
hey norman, when i search your client source code i find no JS code calling to Stripe.js. Is it possible you're missing one of your application JS files?
I noticed your API key isn't being output correctly in your code
(Line 145 is the last line being output by the server)
would that also NOT work locally? seems to work locally, I see all the fields locally and payments work
Maybe you are using some sort of environment variable on Localhost that isn't present in your Production environment. That would explain identical code but different results
footer has <script src="https://js.stripe.com/v3/"></script>
Hmm nice catch @meager wave
Check how you're getting the Stripe client API key, right before:
var stripe = Stripe('
@cobalt vortex it looks like some code generation is breaking, that JS doesn't even get parsed for me into SOurces (do you see it in your browser dev tool sources?)
Perhaps the publishable key is set in an environment variable you havent yet configured for Prod
And then the script template/generation fails when the value isnt available
ok let me look into this. will take me about 30 minutes, I have to juice some oranges ๐
๐ ๐ฅ
its GOT to be something else that is causing , preventing Stripe from getting its KEY, cause key is a constant that is 100% being loaded, in the same relative path manner, as the site header and footer. And header and footer loads fine. I was thinking maybe its cause im using TEST keys?? stripe is also set to test mode. I dont know whatelse to check. I cleared the cache in my browser and all that. I even moved the stripe js call to the head and not the footer, I just read something on the docs that said it should be in the head, but that changed nothing
Norman I'm not sure what exactly is failing, but your server is returning an incomplete script/page
If you look in your browser dev tools at the network request for register.php you can see this in the response at the bottom, exactly as @meager wave highlighted -- the script is incomplete
I would suggest as a test that you try replacing any generated script here with a fixed script to see that it works
either inlined or loading another resource, either way
satisfy yourself that there is nothing wrong with the code itself, but rather how it is delivered
Ok
you all were 100% right, there was a configuration set in local and NOT set in production. My main config file listed in .gitignore cause I did not want the local DB info overwriting the production, but in the NEW payments Branch, I installed a check AND also placed my STRIPE config info there also, and it was NOT being pushed duh! ๐ Thanks once again, Stripe has the BEST support I have ever seen. ๐
๐ huzzah, very happy to hear its working now!
and i can confirm i see the Elements inputs myself ๐
Have a great day.
You too!