[LRUG] Recurring Payments and subscriptions
Glenn Gillen
glenn at rubypond.com
Tue Sep 7 09:08:43 PDT 2010
> Working on the basis that people tend to use subscription management services (Spreedly etc) with a merchant account, how do people tend to keep that in sync with their app?
All the ones I've used expect you to implement an endpoint on your server that they can call, and you then take appropriate action. Depending on the service it is either a payload with the updated data for a user or it's a list of IDs for you to subsequently fetch the latest details for and then persist.
> For instance, how do you validate an account locally, and on the sub service before save? Do people tend to just let the subscription service manage accounts, and keep calling back for info (which could be slow, and is a major dependancy) or do people try and stay as far away as possible.
I cache the data locally on signup, update it whenever I get a callback from Spreedly, and have a cron job that runs regularly and finds anybody that is active but hasn't had their Spreedly data refreshed for 30 days. I then occasionally check the admin interface to make sure there haven't been any failed calls to my server that I've missed.
The combination seems to cover all the scenarios I care about. I could run a monthly sweep over the whole database to update them all, but it seemed overkill and prone to problems in the future.
More information about the Chat
mailing list