engineersftw / website

Engineers.SG
https://www.engineers.sg
16 stars 15 forks source link

Support stripe payments #67

Closed sarupbanskota closed 4 years ago

sarupbanskota commented 4 years ago

Fixes #55 and also refactors the support template.

TODO:

thorsten-stripe commented 4 years ago

@sarupbanskota qq, did you have issues running bundle exec rake db:migrate? I had to replace all instances of ActiveRecord::Migration with ActiveRecord::Migration[4.2] for the command to run.

Also had to run bin/rails db:migrate RAILS_ENV=development

Drenmi commented 4 years ago

@thorsten-stripe Sorry about that. I'm in the middle of upgrading the dependencies to modern versions. There will be some small hick-ups until I finish it up.

Drenmi commented 4 years ago

@sarupbanskota Is it beneficial in some way to remove PayPal as an option? I'm currently doing monthly donations through PayPal. What will happen to those subscriptions? 🤔

sarupbanskota commented 4 years ago

@sarupbanskota qq, did you have issues running bundle exec rake db:migrate? I had to replace all instances of ActiveRecord::Migration with ActiveRecord::Migration[4.2] for the command to run.

Oh yeah, I forgot to mention that. That's actually what took me the longest in this exercise 😄

My conclusion is that a new snapshot dump wasn't checked in after db/migrate/20161113082712_add_slug_to_organizations_table.rb was introduced, hence after you run the snapshot dump, Rails doesn't like that a migration is pending and suggests running a migration.

@Drenmi did I analyse right?

sarupbanskota commented 4 years ago

@sarupbanskota Is it beneficial in some way to remove PayPal as an option? I'm currently doing monthly donations through PayPal. What will happen to those subscriptions? 🤔

[Disclaimer: I have nothing to do with Stripe]

One benefit I can think of is that if you keep two options around — that's two places to track. Stripe's UX is arguably smoother, and it supports all the payment options PayPal does so I'd just keep one source.

Existing recurring PayPal subscriptions shouldn't be affected, because from what I gathered, there doesn't seem to be any controls on this website for the user to update them anyway. So if they'd like to cancel, my guess is that they do it through their PayPal account (same for Stripe).

sarupbanskota commented 4 years ago

@thorsten-stripe I've updated the keys, as well as added the failure state.

Feel free to review (keys/plans from Stripe test mode).

thorsten-stripe commented 4 years ago

Thanks so much @sarupbanskota, works like a charm :) I've added the Donate buttons mentioned above, I hope you don't mind: index.html image /support_us.html image

@miccheng would you able to quickly review and if you're 👍 can you swap in the live publishable key and the live sku and plan IDs, merge, and deploy? I've already applied the free processing volume to the Code Craft Stripe account, you'll only need to ack it from your Stripe Dashboard :)

sarupbanskota commented 4 years ago

@miccheng Lemme know if you need anything further from me, or if it's good to go!

miccheng commented 4 years ago

I'll try to clear this over the weekend. Sorry for the delay.


Regards,

Michael Cheng CM Mobile: +65 9185 5166 LinkedIn: http://sg.linkedin.com/in/miccheng

On Fri, Jan 10, 2020 at 4:43 PM Sarup Banskota notifications@github.com wrote:

@miccheng https://github.com/miccheng Lemme know if you need anything further from me, or if it's good to go!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/engineersftw/website/pull/67?email_source=notifications&email_token=AABTYDDSR6LUQFXDMBP5WBTQ5AYKFA5CNFSM4KDF7SA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEITEA3A#issuecomment-572932204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABTYDDRJMGIV6PFSARXDA3Q5AYKFANCNFSM4KDF7SAQ .

miccheng commented 4 years ago

@thorsten-stripe @sarupbanskota I'll merge first and fix the values.