You are here

public function PaymentMethodStorageInterface::createForCustomer in Commerce Core 8.2

Constructs a payment method for a customer, without permanently saving it.

Parameters

string $payment_method_type: The payment method type.

string $payment_gateway_id: The payment gateway ID.

string|int $customer_id: The customer ID.

\Drupal\profile\Entity\ProfileInterface $billing_profile: The billing profile, optional.

Return value

\Drupal\commerce_payment\Entity\PaymentMethodInterface A new payment method object.

1 method overrides PaymentMethodStorageInterface::createForCustomer()
PaymentMethodStorage::createForCustomer in modules/payment/src/PaymentMethodStorage.php
Constructs a payment method for a customer, without permanently saving it.

File

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

Class

PaymentMethodStorageInterface
Defines the interface for payment method storage.

Namespace

Drupal\commerce_payment

Code

public function createForCustomer($payment_method_type, $payment_gateway_id, $customer_id, ProfileInterface $billing_profile = NULL);