Add unit test for net_amount when fee_amount is set #14909
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This just improves testing & ensures fee_amount is used to set net amount.
I got some odd results on financial_trxn & financial_item but just adding checks for
what I found atm
Before
Less tests, net_amount not calculated off fee_amount
After
More tests, net_amount calculated
Technical Details
Preliminary digging towards eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor#127
Comments
@mattwire I think this was something you were trying to tell me about - even though we say processors should only set fee_amount in this scenario that wasn't enough & without this patch they need to set net_amount too