I'm having trouble understanding how an "Authorize" command is executed in a payment method.
For example, if I use the sample payment gateway that Magento provides: https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway, how is the request builder going to be called?
This is a reference to Joni Jones's answer
When Magento performs place order actions, it calls authorize or capture (used for sale operation too) payment operation (according to an operation configured for the selected payment method).
This is the part that I'm having trouble with.
Do I understand you correctly that the command, which is specified in the payment modules
di.xml (authorize/capture/sale) gets automatically called when the "Place order" action gets triggered?
If so, what is the entry point, i.e. which class/file gets called first in a hypothetical situation where you have only 1 command in a command pool (e.g. the authorize command)?
And, if it's not asking too much, what is the bare minimum that you need to have to start execution of a command? Is it really enough to just have a simple custom payment method and the command specified in the payment method's