I am using the AnetAPI/LineItemType() to set new line items on orders. I am trying to set the taxable tag on each line item to "N".
$designate = new AnetAPI\LineItemType(); $designate->setItemId("Designate a Donation"); $designate->setName("Designate a Donation"); $designate->setDescription($designate_reason); $designate->setQuantity("1"); $designate->setUnitPrice(0); $designate->setTaxable("N"); $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->addToLineItems($designate);
I've tried "N", "false", and both without quotes. No go - the line items still get returned as Taxable: "Y". Did this method change? Am I doing something wrong? Any help is appreciated!
12-21-2015 09:41 AM
Hi there,
We ust updated the sample code to show the correct usage for setting taxable on line items: https://github.com/AuthorizeNet/sample-code-php/commit/4d70fe00771593a42ab3051d0662cb8bbb5b727e
Apologies for the incorrect sample, PHP is a little too forgiving and was just accepting incorrect values as "not set" which then defaulted to true/Y.
Good luck,
Brian
12-28-2015 03:20 PM