Model
Transaction
Magento\Sales\Model\Order\Payment\Transaction
What it does
This class manages payment transactions in Magento 2, tracking transaction history and building hierarchical relationships between different transaction types (authorization, capture, void, refund).
Developers use it to create, retrieve, and manage payment transactions, close authorizations/captures, check transaction states, and store additional payment information throughout the order lifecycle.
Public Methods
- setTxnId()
- setParentTxnId()
- setTxnType()
- getParentTransaction()
- getChildTransactions()
- closeAuthorization()
- closeCapture()
- canVoidAuthorizationCompletely()
- hasChildTransaction()
- setAdditionalInformation()
- getAdditionalInformation()
- unsAdditionalInformation()
- close()
- getOrderId()
- getOrder()
- setOrder()
- isFailsafe()
- beforeSave()
- isVoided()
- getTransactionTypes()
- getOrderWebsiteId()
- getTransactionId()
- setTransactionId()
- getMethod()
- getIncrementId()
- getParentId()
- getPaymentId()
- getTxnId()
- getHtmlTxnId()
- getParentTxnId()
- getTxnType()
- getIsClosed()
- getCreatedAt()
- setCreatedAt()
- setParentId()
- setOrderId()
- setPaymentId()
- setIsClosed()
- getExtensionAttributes()
- setExtensionAttributes()