Notifications of subscription changes #679
Replies: 1 comment 1 reply
-
Right now, Pay simply syncs the actual data from the APIs, so these don't exist. It could be nice to have a feature like this, but it is not really a status as much as it is an event that happened to change the status. I would think it'd be better to emit events on these changes and let Pay users consume them with callbacks instead of trying to save it as a status and then layer callbacks on top. Also your |
Beta Was this translation helpful? Give feedback.
-
How can I get notified of subscription changes in Pay?
I see that I can extend the
Pay::Subscription
model with a module, which helps. But I feel like there's got to be a better way than checkingprevious_changes
after a commit. Am I missing something?Here's a gist of the working (but ugly) code and passing tests.
https://gist.github.com/joemasilotti/c0f7f3c4c31f67a81c13d10579af22be
Beta Was this translation helpful? Give feedback.
All reactions