public function setCashItems($items)
    {
        $this->params['cashItems'] = base64_encode(
            json_encode(
                array_map(function ($item) {
                    /** @var CashItem $item */
                    return array(
                        'name'  => $item->getName(),
                        'count' => $item->getCount(),
                        'price' => $item->getPrice()
                    );
                }, $items)));

        return $this;
    }
public function setCashItems($items)
    {
        $this->params['cashItems'] = base64_encode(
            json_encode(
                array_map(function ($item) {
                    /** @var CashItem $item */
                    return array(
                        'name'  => $item->getName(),
                        'count' => $item->getCount(),
                        'price' => $item->getPrice()
                    );
                }, $items)));

        return $this;
    }
public function setCashItems ( $ items ) { $ this -> params [ 'cashItems' ] = base64_encode ( json_encode ( array_map ( function ( $ item ) { /** @var CashItem $item */ return array ( 'name' => $ item -> getName ( ) , 'count' => $ item -> getCount ( ) , 'price' => $ item -> getPrice ( ) ) ; } , $ items ) ) ) ; return $ this ; }
Set list of paid goods

@param CashItem[] $items

@return UnitPay
Set list of paid goods