Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Payment stripe token can't be blank #4

Open
abhishek77in opened this issue Aug 17, 2013 · 4 comments
Open

Payment stripe token can't be blank #4

abhishek77in opened this issue Aug 17, 2013 · 4 comments

Comments

@abhishek77in
Copy link

I created a simple sample piggybak app. I am trying to integrate it with stripe, but I am getting Payment stripe token can't be blank error.

I was able to successfully add all stripe keys as recommended in the README. You can have a look at the commit which integrates stripe to my application.

To reproduce the issue -

  1. Clone Sample Piggybak App and run it locally
  2. Sign-up
  3. Add a product with variant from rails admin
  4. Add product to cart and try to checkout.
@bgkittrell
Copy link

Anyone figure this one out? I have the same issue.

@abhishek77in
Copy link
Author

Instead of doing //= require piggybak_stripe try to include the same file in layouts/application.html.erb.

@abhishek77in
Copy link
Author

Something like this worked for me -

  <script type="text/javascript" src="https://js.stripe.com/v2/"></script>
  <%= javascript_include_tag "application" %>

  <% if "#{params[:controller]}##{params[:action]}" == "piggybak/orders#submit" -%>
    <%= javascript_include_tag "piggybak_stripe" %>
    <%= javascript_include_tag "piggybak/piggybak-application" %>
  <% end -%>

@mtuckerb
Copy link

was that all you needed? I just installed this gem, came up with the same problem, tried this solution, and didn't find joy :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants