CRM-15622: Fix for incorrect Fee Amount.
authorPeter Haight <peterh@giantrabbit.com>
Wed, 19 Nov 2014 23:57:59 +0000 (15:57 -0800)
committerPeter Haight <peterh@giantrabbit.com>
Thu, 20 Nov 2014 00:07:15 +0000 (16:07 -0800)
commit9b7e7d4c3abac6f11ab7bd41a6f07cd5fc340720
tree529bb18c0253deabcb9fd95acf3a379bf43e5418
parentd48ed7da5868bb1cad7e1b2d83b0d3eb1bac95af
CRM-15622: Fix for incorrect Fee Amount.

There's a bunch of fee_amount fields in this section of the code leading
to a lot of confusion (see CRM-15372). Many of the payment processors set
the fee_amount field in the result array they return which sets up the
contribution.fee_amount field, but the Authorize.Net AIM API doesn't
return fee information, so Authorize.Net doesn't set this field. Instead
of setting this field to 0 there, I thought it would be better to not
require that the payment processor set this field. Since some of the
payment processors return the same array that was passed into them and the
payment processors don't need the fee_amount field as an argument, I think
that setting that to NULL before passing it in gets us the correct output.

Note that we still need the fix from CRM-15372 to get the
participant.fee_amount field set correctly because the code that sets up
the pariticpant shares the field array that the contribution creation
uses even though they don't have the same 'fee_amount' field.
CRM/Event/Form/Participant.php