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
Eric

  • Jack Kitterhing

    Hi there @Eric,

    Hope you're well today and thanks for your question.

    This entirely depends on the gateway and it's API that your using, normally it'll require a some form payment notification return.

    The best gateway to look at in Pro sites in Pro Sites > pro-site-files > gateways > gateway-paypal-express-pro.php

    Which has the code commented inline.

    This could be the issue with the premium plugin still being activated, if it's not integrated with the return and so it's not expiring the site.

    Which payment gateway are you trying to integrate?

    Thanks!

    Kind Regards
    Jack.

  • Eric

    Thanks for the quick response. Appreciate it.

    I'm using eWay. I already implement the subscription and unsubscription part.

    I use the payment gateway recurring bill for subscription payment. For example after 1 month of subscription, the payment try to charge the customer from eWay. How prosite know if the payment succeed of failed?

    Also on unsubscription, user is given time to use the pro account until the end of the subscription date. When the due date passed, does prosite automatically disable premium plugins that is part of the pro member?

    Sorry for bad English.

    Thanks
    Eric

  • Jack Kitterhing

    Hi there @Eric,

    Hope you're well today and thanks for the additional information.

    I've never used the eWay API myself, though I can see they have some PHP examples, you'll need to check the current PayPal gateway for how it handles the IPN return and expiration process and then implement the recurring eWay API, I also found this https://github.com/samuelwilliams/eWay-PHP-API :slight_smile:

    Also on unsubscription, user is given time to use the pro account until the end of the subscription date. When the due date passed, does prosite automatically disable premium plugins that is part of the pro member?

    If the payment isn't received, the premium plugins would be deactivated, yes. :slight_smile:

    Also, is it okay to put files in prosite folder? Will they be replaced by updates?

    You'll most likely need to include the custom gateway there, but it would be overwritten by updates, you'd be best to manually update the plugin via FTP and only replace the files that include changes.

    Thanks!

    Kind Regards
    Jack.