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
Donations with Stripe credit card processing! #760
Conversation
656bfcc
to
8ade92d
Compare
app/views/donations/new.html.erb
Outdated
<button id="js-stripe-button">DONATE</button> | ||
|
||
<script> | ||
var handler = StripeCheckout.configure({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone has any ideas as to how to get this out of the view, I'm all ears. The problem is that the:
<script src="https://checkout.stripe.com/checkout.js"></script>
near the top of this file has already loaded and allows for calling StripeCheckout.configure
. I'm not sure how to extract everything in the <script>
block out into donations.js
while still allowing for access to StripeCheckout
.
app/views/donations/new.html.erb
Outdated
@@ -1,4 +1,10 @@ | |||
<%= form_tag [:donations] do %> | |||
<%= form_tag [:donations], id: "js-stripe-form" do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know for form that are for external library or other thing like that, but we try to use form_with
for the form. If it's specific to Stripe or there is something that you need to do that can't be done with form_with
it's cool. Otherwise, consistency would be nice. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally cool! I've been in Rails 4.2 land for a while now with work and just wasn't thinking about it. I'm sure that form_with
should be just fine. 👍
I created this by accident in merge conflict commit (in the browser).
This PR is getting pretty big, but here are the two main pages that are being added.
The Main Support page where you can give a one-item donation, sign up for a monthly subscription, and also request a link to make changes to an existing subscription:
Email with link to Support Edit:
The Support Edit page where you can update or cancel a subscription: