You are here

public function PaymentGatewayInterface::toMinorUnits in Commerce Core 8.2

Converts the given amount to its minor units.

For example, 9.99 USD becomes 999.

Parameters

\Drupal\commerce_price\Price $amount: The amount.

Return value

int The amount in minor units, as an integer.

Deprecated

This method was replaced with MinorUnitsConverter::toMinorUnits().

See also

\Drupal\commerce_price\MinorUnitsConverter::toMinorUnits()

1 method overrides PaymentGatewayInterface::toMinorUnits()
PaymentGatewayBase::toMinorUnits in modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php
Converts the given amount to its minor units.

File

modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayInterface.php, line 155

Class

PaymentGatewayInterface
Defines the base interface for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

public function toMinorUnits(Price $amount);