public function PaymentGatewayBase::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.
Overrides PaymentGatewayInterface::toMinorUnits
Deprecated
This method was replaced with MinorUnitsConverter::toMinorUnits().
See also
\Drupal\commerce_price\MinorUnitsConverter::toMinorUnits()
File
- modules/
payment/ src/ Plugin/ Commerce/ PaymentGateway/ PaymentGatewayBase.php, line 470
Class
- PaymentGatewayBase
- Provides the base class for payment gateways.
Namespace
Drupal\commerce_payment\Plugin\Commerce\PaymentGatewayCode
public function toMinorUnits(Price $amount) {
return $this->minorUnitsConverter
->toMinorUnits($amount);
}