Log in
Interface

MethodInterface

Magento\Payment\Model\MethodInterface

What it does

This interface defines the contract for all payment methods in Magento 2.

Developers implement this interface when creating custom payment methods, defining how the payment handles operations like authorize, capture, refund, and void, along with availability checks and configuration settings.

It standardizes payment method behavior across different payment providers.

Public Methods

  • getCode()
  • getFormBlockType()
  • getTitle()
  • setStore()
  • getStore()
  • canOrder()
  • canAuthorize()
  • canCapture()
  • canCapturePartial()
  • canCaptureOnce()
  • canRefund()
  • canRefundPartialPerInvoice()
  • canVoid()
  • canUseInternal()
  • canUseCheckout()
  • canEdit()
  • canFetchTransactionInfo()
  • fetchTransactionInfo()
  • isGateway()
  • isOffline()
  • isInitializeNeeded()
  • canUseForCountry()
  • canUseForCurrency()
  • getInfoBlockType()
  • getInfoInstance()
  • setInfoInstance()
  • validate()
  • order()
  • authorize()
  • capture()
  • refund()
  • cancel()
  • void()
  • canReviewPayment()
  • acceptPayment()
  • denyPayment()
  • getConfigData()
  • assignData()
  • isAvailable()
  • isActive()
  • initialize()
  • getConfigPaymentAction()