public function getRates($shopSum, $paymentMethod = '', $culture = null)
    {
        if (null === $culture) {
            $culture = $this->culture;
        }

        $response = $this->sendRequest(
            $this->serviceBaseUrl . 'GetRates',
            [
                'MerchantLogin' => $this->auth->getMerchantLogin(),
                'IncCurrLabel'  => $paymentMethod,
                'OutSum'        => $shopSum,
                'Language'      => $culture
            ],
            $this->requestMethod
        );

        $sxe = simplexml_load_string($response);
        $this->parseError($sxe);

        if (!$sxe->Groups->Group) {
            return [];
        }
        $groups = [];
        foreach ($sxe->Groups->Group as $i => $group) {
            $items = [];
            foreach ($group->Items->Currency as $item) {
                $clientSum = (double)$item->Rate->attributes()->IncSum;
                $item = (array)$item;
                $items[] = $item['@attributes'] + ['ClientSum' => $clientSum];
            }
            $groups[] = [
                'Code'        => (string)$group->attributes()->Code,
                'Description' => (string)$group->attributes()->Description,
                'Items'       => $items,
            ];
        }

        return $groups;
    }
public function getRates($shopSum, $paymentMethod = '', $culture = null)
    {
        if (null === $culture) {
            $culture = $this->culture;
        }

        $response = $this->sendRequest(
            $this->serviceBaseUrl . 'GetRates',
            [
                'MerchantLogin' => $this->auth->getMerchantLogin(),
                'IncCurrLabel'  => $paymentMethod,
                'OutSum'        => $shopSum,
                'Language'      => $culture
            ],
            $this->requestMethod
        );

        $sxe = simplexml_load_string($response);
        $this->parseError($sxe);

        if (!$sxe->Groups->Group) {
            return [];
        }
        $groups = [];
        foreach ($sxe->Groups->Group as $i => $group) {
            $items = [];
            foreach ($group->Items->Currency as $item) {
                $clientSum = (double)$item->Rate->attributes()->IncSum;
                $item = (array)$item;
                $items[] = $item['@attributes'] + ['ClientSum' => $clientSum];
            }
            $groups[] = [
                'Code'        => (string)$group->attributes()->Code,
                'Description' => (string)$group->attributes()->Description,
                'Items'       => $items,
            ];
        }

        return $groups;
    }
public function getRates ( $ shopSum , $ paymentMethod = '' , $ culture = null ) { if ( null === $ culture ) { $ culture = $ this -> culture ; } $ response = $ this -> sendRequest ( $ this -> serviceBaseUrl . 'GetRates' , [ 'MerchantLogin' => $ this -> auth -> getMerchantLogin ( ) , 'IncCurrLabel' => $ paymentMethod , 'OutSum' => $ shopSum , 'Language' => $ culture ] , $ this -> requestMethod ) ; $ sxe = simplexml_load_string ( $ response ) ; $ this -> parseError ( $ sxe ) ; if ( ! $ sxe -> Groups -> Group ) { return [ ] ; } $ groups = [ ] ; foreach ( $ sxe -> Groups -> Group as $ i => $ group ) { $ items = [ ] ; foreach ( $ group -> Items -> Currency as $ item ) { $ clientSum = ( double ) $ item -> Rate -> attributes ( ) -> IncSum ; $ item = ( array ) $ item ; $ items [ ] = $ item [ '@attributes' ] + [ 'ClientSum' => $ clientSum ] ; } $ groups [ ] = [ 'Code' => ( string ) $ group -> attributes ( ) -> Code , 'Description' => ( string ) $ group -> attributes ( ) -> Description , 'Items' => $ items , ] ; } return $ groups ; }
Returns the sums with commission and some addition data.

@param float       $shopSum
@param string      $paymentMethod
@param string|null $culture

@return array
Returns the sums with commission and some addition data .