Adapter
Magento\Payment\Model\Method\Adapter
What it does
This class serves as a flexible adapter that wraps payment gateway functionality in Magento 2, allowing developers to create payment methods by configuring commands, validators, and value handlers rather than writing extensive custom code.
Developers use this as a base for virtual types when integrating third-party payment providers, enabling them to handle operations like authorize, capture, refund, and void through a standardized interface.
It bridges the gap between Magento's payment workflow and external payment gateway APIs.
Public Methods
- getValidatorPool()
- canOrder()
- canAuthorize()
- canCapture()
- canCapturePartial()
- canCaptureOnce()
- canRefund()
- canRefundPartialPerInvoice()
- canVoid()
- canUseInternal()
- canUseCheckout()
- canEdit()
- canFetchTransactionInfo()
- canReviewPayment()
- isGateway()
- isOffline()
- isInitializeNeeded()
- isAvailable()
- isActive()
- canUseForCountry()
- canUseForCurrency()
- getConfigData()
- validate()
- fetchTransactionInfo()
- order()
- authorize()
- capture()
- refund()
- cancel()
- void()
- acceptPayment()
- denyPayment()
- getCode()
- getTitle()
- setStore()
- getStore()
- getFormBlockType()
- getInfoBlockType()
- getInfoInstance()
- setInfoInstance()
- assignData()
- initialize()
- getConfigPaymentAction()
- canSale()
- sale()