I'm working on custom payment system in which I am using Magento2 default vault functionality. Everything is working fine when if I replace below code in file Magento\Vault\Model\Method\Vault
into authorize()
or capture()
methods.
$commandExecutor = $this->commandManagerPool->get(
$this->getVaultProvider()->getCode()
);
to
$commandExecutor = $this->commandManagerPool->get(
"method_code"
);
My question is how can I assign vaultprovider
? so I can get method code directly form vaultprovider
object.
Note: I'm not placing an order in Magento, I just authorize or capture amount from third party payment gateway system(paypal pro) in my custom module.