Closed (fixed)
Project:
Commerce Authorize.Net
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2018 at 11:53 UTC
Updated:
4 Apr 2018 at 19:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
czigor commentedI 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.
Comment #3
lisastreeter commentedI 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.
Comment #4
czigor commentedHi @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.Comment #5
lisastreeter commentedHi @czigor,
Thank you.
I'm sorry, I shouldn't have missed that! This patch should be ok now.
Thank you. I wasn't sure how changes to the commerceguys code worked. I'll do this next.
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?
Comment #6
lisastreeter commentedComment #7
czigor commentedMy bad, you're already using collectAdjustments().
Comment #10
czigor commented