I am able to create a JournalEntry using PHP-API
I am also able to upload an attachment using PHP-API.
However the attachment is not getting linked to the JournalEntry, instead it is showing up in the UnLinked list.
$entityRef = new IPPReferenceType(array('value'=>'JE9999', 'type'=>'JournalEntry'));
$attachableRef = new IPPAttachableRef(array('EntityRef'=>$entityRef));
$objAttachable = new IPPAttachable();
$objAttachable->FileName = "testfile.jpg";
$objAttachable->AttachableRef = $attachableRef;
$resultObj = $GLOBALS['dataService']->Upload(base64_decode($imageBase64['attach']),$objAttachable->FileName,$sendMimeType,$objAttachable);