Search for Resources and Solutions

Cron Job for Payments

I've decided a year ago to have only one cron job url for all cron job tasks. But i have changed a little this idea because i've understood for payments i need too a cron job url because should be called once per day. 

Which is the role of the Cron Job for Payments?

  • When someone creates a subscription, the subscription will be saved in the database. 
  • After this, every day we need to verify if the existing subscriptions has new transactions and generate new transaction in Midrub and invoices. 
  • Why every day? Because I can't know how long is your plans period.
  • Another reason, if the subscription was deleted by user or user don't has money, will be deleted even in Midrub the subscription.

The Cron Job for Payments will be required in the cron.php but you can decide if you want to use only the url.

From december the Cron Job for Payments will be required because i need a better control for the Midrub's plans. 

The Cron's url is https://www.yourwebsite.com/payments/cron-job 

Was this article helpful?