PaymentTokenManagement
Magento\Vault\Model\PaymentTokenManagement
What it does
This class manages payment tokens stored in Magento's Vault system, which allows customers to save payment methods for future use.
Developers use this class to retrieve, save, and link payment tokens to customer accounts and orders, such as getting a customer's saved credit cards or linking a new payment token to an order.
It provides methods to search for tokens by various criteria like customer ID, gateway token, or public hash.
Public Methods
- getListByCustomerId()
- getVisibleAvailableTokens()
- getByPaymentId()
- getByGatewayToken()
- getByPublicHash()
- saveTokenWithPaymentLink()
- addLinkToOrderPayment()