Log in
Model

Payment

Magento\Sales\Model\Order\Payment

What it does

The Order Payment class manages all payment-related operations for Magento orders including authorization, capture, void, and refund transactions.

Developers use this class when processing payment operations, updating payment states, handling payment notifications from gateways, and managing the relationship between payments and related order documents like invoices and credit memos.

Public Methods

  • setOrder()
  • getOrder()
  • setTransactionId()
  • getTransactionId()
  • setIsTransactionClosed()
  • getParentTransactionId()
  • setParentTransactionId()
  • canCapture()
  • canRefund()
  • canRefundPartialPerInvoice()
  • canCapturePartial()
  • place()
  • capture()
  • registerCaptureNotification()
  • registerAuthorizationNotification()
  • pay()
  • cancelInvoice()
  • canVoid()
  • void()
  • registerVoidNotification()
  • setCreditmemo()
  • getCreditmemo()
  • refund()
  • registerRefundNotification()
  • cancelCreditmemo()
  • cancel()
  • canReviewPayment()
  • canFetchTransactionInfo()
  • accept()
  • deny()
  • update()
  • authorize()
  • addTransaction()
  • addTransactionCommentsToOrder()
  • importTransactionInfo()
  • prependMessage()
  • formatAmount()
  • formatPrice()
  • getAuthorizationTransaction()
  • isCaptureFinal()
  • isSameCurrency()
  • setTransactionAdditionalInfo()
  • getTransactionAdditionalInfo()
  • resetTransactionAdditionalInfo()
  • getAccountStatus()
  • getAdditionalData()
  • getAddressStatus()
  • getAmountAuthorized()
  • getAmountCanceled()
  • getAmountOrdered()
  • getAmountPaid()
  • getAmountRefunded()
  • getAnetTransMethod()
  • getBaseAmountAuthorized()
  • getBaseAmountCanceled()
  • getBaseAmountOrdered()
  • getBaseAmountPaid()
  • getBaseAmountPaidOnline()
  • getBaseAmountRefunded()
  • getBaseAmountRefundedOnline()
  • getBaseShippingAmount()
  • getBaseShippingCaptured()
  • getBaseShippingRefunded()
  • getCcApproval()
  • getCcAvsStatus()
  • getCcCidStatus()
  • getCcDebugRequestBody()
  • getCcDebugResponseBody()
  • getCcDebugResponseSerialized()
  • getCcExpMonth()
  • getCcExpYear()
  • getCcLast4()
  • getCcNumberEnc()
  • getCcOwner()
  • getCcSecureVerify()
  • getCcSsIssue()
  • getCcSsStartMonth()
  • getCcSsStartYear()
  • getCcStatus()
  • getCcStatusDescription()
  • getCcTransId()
  • getCcType()
  • getEcheckAccountName()
  • getEcheckAccountType()
  • getEcheckBankName()
  • getEcheckRoutingNumber()
  • getEcheckType()
  • getLastTransId()
  • getMethod()
  • getParentId()
  • getPoNumber()
  • getProtectionEligibility()
  • getQuotePaymentId()
  • getShippingAmount()
  • getShippingCaptured()
  • getShippingRefunded()
  • setParentId()
  • setBaseShippingCaptured()
  • setShippingCaptured()
  • setAmountRefunded()
  • setBaseAmountPaid()
  • setAmountCanceled()
  • setBaseAmountAuthorized()
  • setBaseAmountPaidOnline()
  • setBaseAmountRefundedOnline()
  • setBaseShippingAmount()
  • setShippingAmount()
  • setAmountPaid()
  • setAmountAuthorized()
  • setBaseAmountOrdered()
  • setBaseShippingRefunded()
  • setShippingRefunded()
  • setBaseAmountRefunded()
  • setAmountOrdered()
  • setBaseAmountCanceled()
  • setQuotePaymentId()
  • setAdditionalData()
  • setCcExpMonth()
  • setCcSsStartYear()
  • setEcheckBankName()
  • setMethod()
  • setCcDebugRequestBody()
  • setCcSecureVerify()
  • setProtectionEligibility()
  • setCcApproval()
  • setCcLast4()
  • setCustomAttribute()
  • setCcStatusDescription()
  • setEcheckType()
  • setCcDebugResponseSerialized()
  • setCcSsStartMonth()
  • setEcheckAccountType()
  • setLastTransId()
  • setCcCidStatus()
  • setCcOwner()
  • setCcType()
  • setPoNumber()
  • setCcExpYear()
  • setCcStatus()
  • setEcheckRoutingNumber()
  • setAccountStatus()
  • setAnetTransMethod()
  • setCcDebugResponseBody()
  • setCcSsIssue()
  • setEcheckAccountName()
  • setCcAvsStatus()
  • setCcNumberEnc()
  • setCcTransId()
  • setAddressStatus()
  • getExtensionAttributes()
  • setExtensionAttributes()
  • setIsTransactionPending()
  • getIsTransactionPending()
  • setIsFraudDetected()
  • getIsFraudDetected()
  • setShouldCloseParentTransaction()
  • getShouldCloseParentTransaction()