You are here

public function PaymentMethodStorageInterface::loadReusable in Commerce Core 8.2

Loads the user's reusable payment methods for the given payment gateway.

Parameters

\Drupal\user\UserInterface $account: The user account.

\Drupal\commerce_payment\Entity\PaymentGatewayInterface $payment_gateway: The payment gateway.

array $billing_countries: (Optional) A list of billing countries to filter by. For example, if ['US', 'FR'] is given, only payment methods with billing profiles from those countries will be returned. Filtering is skipped if the payment gateway doesn't collect billing information.

Return value

\Drupal\commerce_payment\Entity\PaymentMethodInterface[] The reusable payment methods.

1 method overrides PaymentMethodStorageInterface::loadReusable()
PaymentMethodStorage::loadReusable in modules/payment/src/PaymentMethodStorage.php
Loads the user's reusable payment methods for the given payment gateway.

File

modules/payment/src/PaymentMethodStorageInterface.php, line 32

Class

PaymentMethodStorageInterface
Defines the interface for payment method storage.

Namespace

Drupal\commerce_payment

Code

public function loadReusable(UserInterface $account, PaymentGatewayInterface $payment_gateway, array $billing_countries = []);