Can't create a new Payment Gateway

Hello Community,
I need to develop a new Payment Integration to a Gateway that is very used in my country (neither PayPal nor Razorpay is popular here).

I walked trough the paypal_integration code and tried to reproduce this code in order to create a new Payment Gateway: paypal_integration/paypal_settings.py at master · frappe/paypal_integration · GitHub

The code execute without erros but the Payment Gateway isn’t created (is there another way to achieve that?)
I can go in another way with the integration but prefer emulate the paypal_integration module and use the Payment Gateway and Payment Gateway Account DocTypes.

Thanks in advance

Sorry for bother, i just realised that i need a frappe.db.commit() after the insert.