ruby on rails - Stripe notification mechanism -
i have typical scenario have video model paid.
i have stripe integrated credit card processing. problem how can check if user subscribed , users payment not out of date before user watching video?
any ideas how accomplish this? appreciated. thanks.
first need way tell if user valid. can keeping track of amount owed, or using datetime field such last_paid_at
update when user pays bill.
in before_filter videos, check if user invalid. if balance > 0 or if it's been longer month since last payment.
check out stripe webhooks notified when payment goes through. webhooks endpoints stripe can send information.
Comments
Post a Comment