Pro Sites Custom Gateway addition


Thinking about integrating another gateway into the pro sites system. I am aware it will take some custom programming on our end, but would you please let us know how to do it correctly? The gateway (JVZoo) is capable of setting up recurring subscriptions, what we need, is for when the subscription is created in the gateway, the WP will create a user+site+pro sites subscription for him and when the gateway stops receiving recurring payments, the pro sites terminates the pro sites status. Any suggestions on how to approach it?