Agreement
Magento\Paypal\Model\Billing\Agreement
What it does
This class manages PayPal billing agreements (recurring payment authorizations) in Magento 2.
Developers use it to create, cancel, and track billing agreements between customers and PayPal, enabling automatic payments without requiring customers to re-enter payment details for each transaction.
It handles the complete lifecycle including token initialization, verification, activation, and order relationship tracking.
Public Methods
- beforeSave()
- afterSave()
- getStatusLabel()
- initToken()
- verifyToken()
- place()
- cancel()
- canCancel()
- getStatusesArray()
- isValid()
- importOrderPayment()
- getAvailableCustomerBillingAgreements()
- needToCreateForCustomer()
- addOrderRelation()