protected function _saveAttributes( array $attributes, MShop_Order_Item_Base_Service_Interface $serviceItem, $type = 'payment/paypal' )
	{
		$attributeManager = MShop_Factory::createManager( $this->_getContext(), 'order/base/service/attribute' );

		$map = array();
		foreach( $serviceItem->getAttributes() as $attributeItem ) {
			$map[ $attributeItem->getCode() ] = $attributeItem;
		}

		foreach( $attributes as $code => $value )
		{
			if( array_key_exists( $code, $map ) !== true )
			{
				$attributeItem = $attributeManager->createItem();
				$attributeItem->setServiceId( $serviceItem->getId() );
				$attributeItem->setCode( $code );
				$attributeItem->setType( $type );
			}
			else
			{
				$attributeItem = $map[$code];
			}

			$attributeItem->setValue( $value );
			$attributeManager->saveItem( $attributeItem );
		}
	}