You are here

public function HostedFields::createPaymentMethodNonce in Commerce Braintree 8

Creates a payment method nonce.

Used by the review checkout pane.

Return value

/Braintree/PaymentMethodNonce The PaymentMethodNonce response object.

Overrides HostedFieldsInterface::createPaymentMethodNonce

File

src/Plugin/Commerce/PaymentGateway/HostedFields.php, line 188

Class

HostedFields
Provides the HostedFields payment gateway.

Namespace

Drupal\commerce_braintree\Plugin\Commerce\PaymentGateway

Code

public function createPaymentMethodNonce($payment_method_token) {
  return $this->api
    ->paymentMethodNonce()
    ->create($payment_method_token);
}