-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Stripe "You did not provide an API key" on donate form payment #1050
Comments
(The Internal Server Error in my console are unrelated errors loading images caused by missing |
If I modify diff --git a/gems/bess/lib/houdini/engine.rb b/gems/bess/lib/houdini/engine.rb
index ddb499f4..fc6ef5b0 100644
--- a/gems/bess/lib/houdini/engine.rb
+++ b/gems/bess/lib/houdini/engine.rb
@@ -34,6 +34,8 @@ module Houdini
config.houdini.payment_providers.stripe = ActiveSupport::OrderedOptions.new
config.houdini.payment_providers.stripe.public_key = ENV['STRIPE_API_PUBLIC']
config.houdini.payment_providers.stripe.private_key = ENV['STRIPE_API_KEY']
+ puts config.houdini.payment_providers.stripe.private_key
+ puts config.houdini.payment_providers.stripe.public_key
config.houdini.payment_providers.stripe.connect = false
config.houdini.payment_providers.stripe.proprietary_v2_js = false and start Then if I modify diff --git a/app/views/layouts/_javascripts.html.erb b/app/views/layouts/_javascripts.html.erb
index 5c724dc5..4c8ba88d 100644
--- a/app/views/layouts/_javascripts.html.erb
+++ b/app/views/layouts/_javascripts.html.erb
@@ -8,6 +8,9 @@
<%= javascript_pack_tag "page__stripe_wrapper" %>
<% end %>
+<pre>Debug 1: <%= Houdini.payment_providers.stripe %></pre>
+<pre>Debug 2: <%= Houdini.payment_providers.stripe.public_key %></pre>
+
<script>
Stripe.setPublishableKey("<%= Houdini.payment_providers.stripe.public_key %>");
window._csrf = "<%= form_authenticity_token %>"; and view the dashboard page, I see: <pre>Debug 1: #<Houdini::PaymentProvider::StripeProvider:0x00007f2d596e1b48></pre>
<pre>Debug 2: </pre> That's unexpected, because I know that the |
If I forge ahead by temporarily hard-coding my Stripe public key directly into the template and submit the credit card form, the authorization header is all good and the POST to api.stripe.com succeeds, but I then get a 404 on |
If I do the same as above (temporarily hard-code public key) while logged into the dashboard, I get at error from the Stripe API:
|
I think these are two separate issues. Would you be able to separate them? |
@BenSturmfels This may relate to your second bug or it may not. #1066 |
Sure, it may well be three separate issues, so I'll break them out. Just didn't want to create too much noise. |
Confirming that the "You did not provide an API key" issue is fixed by PR #1066. No change for the other two, but they're now in separate issues. |
@BenSturmfels: am I correct that we can close this issue? |
Yes can close. Up to you about the order of things, but I'd tend to wait until the PR is merged before closing the issue to avoid confusion. |
Ah, fair point! |
After configuring my local development environment with
STRIPE_API_KEY
andSTRIPE_API_PUBLIC
and adding someputs
intogems/bess/lib/houdini/engine.rb
to verify tha the environment variables are being being read in, I'm seeing the a "You did not provide an API key" error on the donate form (screenshot below).From what I can see in the browser console, the
Authorization: Bearer
header is missing the the API key on the end, e.g.Authorization: Bearer XXX
.This is running against master in development mode, Ruby 2.7.4 and allowing assets to be built in-process (not a separate webpack process).
The text was updated successfully, but these errors were encountered: