If I understand the question properly, Aleksandr Blekh answers the question well here: Are there any actual open source payment gateways, not just a library that integrates with other payment gateways? He mentioned three sources: