User Guide and Documentation

get_prices() - CostsRelease Date: 2019/08/01

It is used to get price information according to countries by way of API.

public function get_prices(){
    $prices = $this->instance->get_prices();
    $result = [];
    if($prices)
        foreach($prices AS $row) $result[$row["countryCode"]] = $row["prices"];
    else{
        $this->error = $this->instance->error;
        return false;
    }
    return $result;
}

Return Value;

Array
(
    [US] => Array
        (
            [USD] => 0.0011
            [EUR] => 0.0021
            [DDK] => 0.0212
        )

    [DE] => Array
        (
            [USD] => 0.0022
            [EUR] => 0.0032
            [DDK] => 0.0421
        )

    [CH] => Array
        (
            [USD] => 0.0011
            [EUR] => 0.0021
            [DDK] => 0.0212
        )

)
Copyright © 2019. All rights reserved.
Top