sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

How do you set tax?

Open octoxan opened this issue 5 years ago • 0 comments

If I don't set a tax, I get an error that tax is required. How do you set tax? It's not documented anywhere.

$transactionRequestType = new AnetAPI\TransactionRequestType();
$transactionRequestType->setTransactionType("authCaptureTransaction");
$transactionRequestType->setAmount(request('amt'));
$transactionRequestType->setTax('0.00');

This errors: Argument 1 passed to net\authorize\api\contract\v1\TransactionRequestType::setTax() must be an instance of net\authorize\api\contract\v1\ExtendedAmountType, string given

Sooo how?

octoxan avatar Dec 28 '20 16:12 octoxan