Submit data to a from with Joomla Rs forms to hubspot


I’m trying to submit data from RSforms ( Joomla component) to hubspot using: ( PHP ) somehow I won’t get it work. Set the form guid and portal ID and paste the PHP script in RS forms (properties - PHP Email scripts). Has anybody get this working and can put me into the right direction?