How Prosite check for recurring payments managed by custom payment gateway?

I currently extend prosite using custom payment gateway. The payment gateway will manage the monthly subscription payment.

What I want to ask is how prosite check with the payment gateway if the payment is success?

Also I try to expire my pro blog in database, the status is expired, but the premium plugins that require prosite is still active.

Thanks for your help