I wrote a payment gateway plugin for commerce, it doesn’t fire the callback function, always shows 1 on the return page, so I did a test to confirm by typing in browser:
http://my-site.com/?wc-api=My_Gateway_Class
It just shows ‘1’ on the page.
I tried http://my-site.com/wc-api/My_Gateway_Class
Same result, I did all the class initiation I needed to do. Don’t know what could be wrong.