Skip to content

Instantly share code, notes, and snippets.

@epitron
Created June 3, 2016 19:37
Show Gist options
  • Save epitron/31355908a3ccc871ca35dbd874d4695f to your computer and use it in GitHub Desktop.
Save epitron/31355908a3ccc871ca35dbd874d4695f to your computer and use it in GitHub Desktop.
15:31:20 epitron | i was wondering if it would be simpler to do all the recurring stuff ourselves
15:31:36 epitron | then we wouldn't have to deal with synching anything
15:31:36 lacuna | jude told me yesterday that they process 28 billion in payments a year
15:31:43 lacuna | i mean, is syncing that hard?
15:31:50 epitron | it's just annoying
15:31:57 lacuna | I think our strategy of putting it all on stripe is going well
15:32:02 epitron | you have to worry about all these corner cases
15:32:08 lacuna | I'm hesitant to rip something out of there if we don't have to
15:32:14 lacuna | okay so let's go through the cases
15:32:29 lacuna | becaues to me, I like that doing it all on stripe puts it all in one place
15:32:35 lacuna | I think it's really smart to keep charging stored cards
15:32:42 lacuna | because a lot of these will be corporate memberships that get expensed
15:32:49 epitron | i think, instead of going through the corner cases, let's go through how simple it is to do it ourselves
15:33:07 lacuna | okay sure, so how would that work?
15:33:09 epitron | if we're doing it ourselves, we only need one method to do the recurring charge
15:33:54 epitron | we can have a cron job that runs nightly and goes: "Membership.to_renew.each { |m| m.recharge! }"
15:34:04 epitron | and recharge just does a stripe charge
15:34:08 epitron | single method
15:34:09 epitron | nice and simple
15:34:30 epitron | if they change their membership, we can refund it and re-charge it
15:35:10 epitron | i like that it's only two points of contact with the stripe API in this scenario
15:35:25 epitron | and it gives us control if we ever want to fix something that's messed up
15:35:33 epitron | and then we only have to worry about paypal API callbacks
15:36:26 lacuna | so do they have a stripe subscription at all?
15:36:35 lacuna | because if they do, won't the stripe subscription recharge itself additionally?
15:36:53 --> | judetucker (~judetucke@2605:e000:90d3:d00:a1db:a2ba:bac7:ef64) has joined #industry
15:36:56 epitron | we would not be using stripe subscriptions in this case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment