I'm trying to understand how to create a new off site payment gateway for Gestpay (Italy premiere Payment Gateway from banca Sella) in expresso store using omnipay library but I really need some guidance.
1) I've understand that I need to make an extension and I've seen the skeleton store_check
2) I've read the "skinny" Build you own gateway on the omnipay website and the only thing I've understood is to look in the existing packages
3) I've looked in the existing packages and I've understand that I need a gateway.php that extends AbstractGateway and in that class I need to put needed parameters plus getters/setters and also the "charging" functions purchase() and completepurchase().
here my understanding starts to fail...
3.1) Ok to the parameters and getters/setters those are the parameters that are editable on Store Payment method configuration page
next there are some methods defined and I understand that purchase() function defines what to do to autorize and capture and that I need a completepurchase() function to handle return from of-site gateway
but next those "official" methods there are other functions in those gateways: for example fetchPaymentmethods() or fetchTransaction() etc etc that are not defined in the omnipay docs...
so I really don't understand if the "standardization" of omnipay is just to have purchase() and completepurchase() and than I can define any other method that I want/need
But also I don't understand who and where those fetch functions are being called
Please HELP!
IMPORTANT
I have also found this GitHub repo with all the code needed to make payments with gestpay but haven' managed to understand how to integrate it with omnipay (saddly a very good library with VERY POOR documentation)