public function PaymentOptionsBuilderInterface::selectDefaultOption in Commerce Core 8.2
Selects the default payment option for the given order.
Priority: 1) The order's payment method 2) The order's payment gateway (if it does not support payment methods) 3) First defined option.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
array $options: The options.
Return value
\Drupal\commerce_payment\PaymentOption The selected option.
1 method overrides PaymentOptionsBuilderInterface::selectDefaultOption()
- PaymentOptionsBuilder::selectDefaultOption in modules/
payment/ src/ PaymentOptionsBuilder.php - Selects the default payment option for the given order.
File
- modules/
payment/ src/ PaymentOptionsBuilderInterface.php, line 48
Class
- PaymentOptionsBuilderInterface
- Builds payment options for an order.
Namespace
Drupal\commerce_paymentCode
public function selectDefaultOption(OrderInterface $order, array $options);