KlarnaHubPrice
in package
Class KlarnaHubPrice
Handles KlarnaHub price operations.
Tags
Table of Contents
- sanitize() : int
- Returns sanitized KlarnaHub prices.
Methods
sanitize()
Returns sanitized KlarnaHub prices.
public
static sanitize( $price) : int
Sometimes the conversion of float values to integer might cause changes in the original amount.
Example:
(int)((float)(9.7) * 100) --> 969
This class handles such effects by first rounding the float value and then converting it to an integer.
Parameters
Return values
int —Returns the sanitized value.