Forums | Mahara Community
Add a payment system/plugins for institutions
08 June 2020, 23:56
How to integrate a payment system for institutions. Each institution on our platform will need to collect payment from their students as we tend to run like a traditional school.
School fees, tuition fees, etc. Are there plugins that already do this? If not, power kindly link a doc on how to get it setup.
10 June 2020, 10:35
There are no built-in plugin for taking payments in Mahara.
And I don't know of any third party plugin that adds this functionality.
Normally places using Mahara have other systems like Moodle set up that handle payments.
However, if you do decide to build a plugin yourself then I would be able to give advice and helpful tips
I'd imagine you would need to make a new module / database table with table containing the minimal of fields thus:
usr => id of user making payment
institution => id name of institution the user is making payment for
internalid => if we need to do payments more than once - eg yearly subscriptions we could have '2020', '2021 etc
amount => amount paid
currency => the currency the payment amount is in
ctime => time of payment
paymentid => the id of the external payment system that accepted the payment
paymentstatus => an integer to represent eg 0 = payment pending / 1 = payment success / 2 = payment failed etc
The payment system would need to save into new table what is to be paid for, then connect to something external to make payments eg paypal, make payment and then update the table row with status of payment, eg success / fail
It will also need some double check (cron job) so that users who have paid but not fully go thru the payment system, eg return to the Mahara site, still get marked as paid.