You are here

public function PaymentMethod::getBillingProfile in Commerce Core 8.2

Gets the billing profile.

Present only if the payment gateway collects billing information.

Return value

\Drupal\profile\Entity\ProfileInterface|null The billing profile entity, or NULL if none found.

Overrides PaymentMethodInterface::getBillingProfile

See also

\Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayInterface::collectsBillingInformation()

1 call to PaymentMethod::getBillingProfile()
PaymentMethod::preSave in modules/payment/src/Entity/PaymentMethod.php
Acts on an entity before the presave hook is invoked.

File

modules/payment/src/Entity/PaymentMethod.php, line 131

Class

PaymentMethod
Defines the payment method entity class.

Namespace

Drupal\commerce_payment\Entity

Code

public function getBillingProfile() {
  return $this
    ->get('billing_profile')->entity;
}