QuestionQ8
Orders, Payments, Shipping, and TaxAn Adobe Commerce Architect receives a request to modify existing payment-gateway functionality so that voided transactions are allowed only for a specified range of paid amounts.
In the vendor module file etc/config.xml, the payment method has the can_void option set to 1.
How should this customization be implemented?
- A Extend Magento\Payment\Model\Method\Adapter and reimplement method void. Use this new class as a new type of payment method facade configuration overriding virtualType type for adapter.
- B Declare a new plugin for class Magento\Payment\Gateway\Config\ConfigValueHandler and using the afterHandle method, change the result for subject can_void.
- C Add new handler with name can_void to virtualType based on type Magento\Payment\Gateway\Config\ValueHandlerPool in payment method facade configuration.
Community Discussion