Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • FormatConverter

Class FormatConverter

Namespace: PayPal\Converter
Located at PayPal/Converter/FormatConverter.php

Methods summary

public static string
# format( $value, $formatter )

Format the data based on the input formatter value

Format the data based on the input formatter value

Parameters

$value
$formatter

Returns

string
public static null|string
# formatToNumber( $value, integer $decimals = 2 )

Format the input data with decimal places

Format the input data with decimal places

Defaults to 2 decimal places

Parameters

$value
$decimals

Returns

null|string
public static null|string
# formatToPrice( $value, null $currency = null )

Helper method to format price values with associated currency information.

Helper method to format price values with associated currency information.

It covers the cases where certain currencies does not accept decimal values. We will be adding any specific currency level rules as required here.

Parameters

$value
$currency

Returns

null|string
API documentation generated by ApiGen