DataConverter.php 554 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * This file is part of the Klarna Core module
  4. *
  5. * (c) Klarna Bank AB (publ)
  6. *
  7. * For the full copyright and license information, please view the NOTICE
  8. * and LICENSE files that were distributed with this source code.
  9. */
  10. namespace Klarna\Core\Helper;
  11. /**
  12. * Class DataConverter
  13. *
  14. * @package Klarna\Core\Helper
  15. */
  16. class DataConverter
  17. {
  18. /**
  19. * Prepare float for API call
  20. *
  21. * @param float $float
  22. *
  23. * @return int
  24. */
  25. public function toApiFloat($float)
  26. {
  27. return round($float * 100);
  28. }
  29. }