You are here

public function WorldpayDirect::createPaymentMethod in Commerce Worldpay 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Commerce/PaymentGateway/WorldpayDirect.php \Drupal\commerce_worldpay\Plugin\Commerce\PaymentGateway\WorldpayDirect::createPaymentMethod()

Creates a payment method with the given payment details.

Parameters

\Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method: The payment method.

array $payment_details: The gateway-specific payment details.

Throws

\Drupal\commerce_payment\Exception\PaymentGatewayException Thrown when the transaction fails for any reason.

Overrides SupportsCreatingPaymentMethodsInterface::createPaymentMethod

File

src/Plugin/Commerce/PaymentGateway/WorldpayDirect.php, line 122

Class

WorldpayDirect
Provides the Worldpay direct payment gateway.

Namespace

Drupal\commerce_worldpay\Plugin\Commerce\PaymentGateway

Code

public function createPaymentMethod(PaymentMethodInterface $payment_method, array $payment_details) {

  // TODO: Implement createPaymentMethod() method.
}