Comments

czigor created an issue. See original summary.

czigor’s picture

I could not find any examples on how to do this. According to the documentation https://developer.authorize.net/api/reference/index.html#payment-transac... only one tax value and type per payment is allowed. If this is the case then I'd prefer not to send any tax data to sending incomplete data.

lisastreeter’s picture

StatusFileSize
new8.97 KB

I added the order tax information to the transaction request. Also I created a CommerceGuys\AuthNet\DataTypes\BaseDataType for the Tax data, which should probably be added to the commerceguys/authnet code instead of the Commerce Authorize.net module. But it's included in this patch for now.

czigor’s picture

Hi @lisastreeter,
Thanks for the patch! Looks good, a few things:
1. It seems that the patch reverts the last few commits, can you remove these bits?
2. The tax data type should be indeed a PR against https://github.com/commerceguys/authnet.
3. Both the order and the order items can have tax adjustments. $order->collectAdjustments() returns them all.

lisastreeter’s picture

StatusFileSize
new3.15 KB
new8 KB

Hi @czigor,

Thank you.

1. It seems that the patch reverts the last few commits, can you remove these bits?

I'm sorry, I shouldn't have missed that! This patch should be ok now.

2. The tax data type should be indeed a PR against https://github.com/commerceguys/authnet.

Thank you. I wasn't sure how changes to the commerceguys code worked. I'll do this next.

3. Both the order and the order items can have tax adjustments. $order->collectAdjustments() returns them all.

Yes, at first I just had $order->getAdjustments() until I realized that I was missing the order-item-level adjustment. I think the tax data should include them all. Is that not correct?

lisastreeter’s picture

Status: Active » Needs review
czigor’s picture

My bad, you're already using collectAdjustments().

  • czigor committed 0fb85dc on 8.x-1.x authored by lisastreeter
    Issue #2951137 by lisastreeter: Send tax information in transaction...

czigor credited mglaman.

czigor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.