Is it possible to integrate custom payment gateway

Hi there,
I am from Srilanka .In my country Paypal,Cyperber ,and Stripe are not available.
I need to integrate custom payment gateway.Is there are any code sample to integrate custom payment gateway.

hello dear friend ,
did you found any solution for your problem ?
i have the same situation