Custom Mobile Money Payment Gateway integration and Automatic Journal entry after transaction

Hi guys,
I am working on School fees payment in erpnext and I want to allow customers (Students) to pay their fees through Mobile Money using my custom payment gateway that I created and I want to integrate it in erpnext; allowing customers pay and whenever a transaction takes place through the gateway, the payment record should be recorded in erpnext Accounting module.

PS: I tried following resources on how to integrate stripe and paystack payment gateway in order to integrate mine in erpnext.
I want to use my custom made payment gateway. I tried following the paystack tutorial but it’s not helpful.

I will be so glad if anyone can help me out or mention a resource that I can use to get this done.

Kind regards.