Valid AD0-E722 Dumps shared by ExamDiscuss.com for Helping Passing AD0-E722 Exam! ExamDiscuss.com now offer the newest AD0-E722 exam dumps, the ExamDiscuss.com AD0-E722 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com AD0-E722 dumps with Test Engine here:
An Adobe Commerce Architect needs to customize the workflow of a monthly installments payment extension. The extension is from a partner who is contracted with the default website Payment Service Provider (PSP), which has its own legacy extension (a module using deprecated payment method). The installment payment partner manages only initializing a payment, and then hands the capture to be executed by the PSP Once the amount is successfully captured, the PSP notifies the website through a webhook. The goal of the webhook is only to create an "invoice" and save the "capture information" to be used later for refund requests through the PSP itself. The Architect needs the most simple solution to capture the requested behavior. Which solution should the Architect implement?
Correct Answer: C
Explanation Option C is the correct solution because declaring a capture command with type Magento\Payment\Gateway\Command\NullCommand for the payment method command pool in di.xml will prevent the default capture logic from being executed. The NullCommand class is a dummy implementation of the CommandInterface that does nothing. This way, the payment capture will be handled by the PSP webhook, and the invoice will be created accordingly12 Option A is not a correct solution because adding a plugin before the $invoice->capture() and changing its input to prevent the call of the $payment->capture() will require modifying the core Magento code, which is not recommended. Moreover, this solution will affect all payment methods that use the invoice capture logic, not just the monthly installments payment extension3 Option B is not a correct solution because changing the can_capture attribute for the payment method under config.xml to be <can_capture>0</can_capture> will disable the capture functionality for the payment method entirely. This means that the invoice cannot be created or captured, even by the PSP webhook4 References: 1: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/payments-integrations/payment-ga https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Payment/Gateway/Command/NullCo https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/customization/best-practices.html? https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/payments-integrations/payment-ga