Log in
Model

LastCreatedPaymentTokenChooser

Magento\InstantPurchase\Model\PaymentMethodChoose\LastCreatedPaymentTokenChooser

What it does

This class selects the most recently created payment token for a customer when using Magento's Instant Purchase feature.

It retrieves valid, non-expired payment tokens from the vault that are supported for instant purchase, sorts them by creation date, and returns the newest one.

Developers use this to automatically choose which saved payment method a customer will use for one-click purchases.

Public Methods

  • choose()