xero-php
xero-php copied to clipboard
Attachment not working on BankTranfer
Hi, Your SDK is great, thanks for the effort in putting it together.
I am adding attachment to Invoices and it works fine, now I have tried adding an attachment to a BankTransfer but it does not seem to work, is this a known issue?
This is my code
$trf = new BankTransfer($xero);
$trf->setAmount(100);
$fromBank = new FromBankAccount($xero);
$fromBank->setCode(1234);
$trf->setFromBankAccount($fromBank);
$toBank = new ToBankAccount($xero);
$toBank->setCode($4567);
$trf->setToBankAccount($toBank);
$trf->setDate($date);
$trf->save();
$attachment = Attachment::createFromLocalFile($filePath,'text/csv');
$trf->addAttachment($attachment);
thanks Kim
Hmm, are you getting any errors?
Hi, no errors, I also printed out the raw response from AttachmentTrait->addAttachment and it seemed to be successful. But when I got Xero the attachment is not present on the bank transfer transaction.
Hi, did you have any luck replicating this behaviour? I can activate some debugging or something if you need.
Hi, Any ideas on this one?