QuestionQ8

Orders, Payments, Shipping, and Tax

An 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?

Explanation

A payment method’s ValueHandlerPool supports configuration values that depend on runtime conditions. A custom handler registered under can_void can evaluate the paid amount and return whether voiding is permitted for that payment, while leaving the standard payment facade and void operation intact. Adobe Commerce specifically documents can_void as a configuration value that can depend on transaction status or paid amount.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!