Hi
I am creating a web shop and have to calculate how much to charge the customer to make sure that the fees are cancelled. The payment system adds the fees and I want the customer to pay them.
The fees are 2.45% and € 1.10.
This means that if the customer shops for € 100, and I report that value to the payment system, we will only get € 96.45. (100 - (2.45 + 1.1)).
That is not good.
How do I calculate the right value to send to the payment system, so that we get € 100? It is not just to say € 100 + 2.45% + € 1.1 = € 103.55 and report this to the payment system. Because then the payment system will say
€ 103.55 - ((2.45% of 103.55) + 1.1)
€ 103.55 - (2,536975 + 1.1)
€ 103.55 - 3,636975
€ 99,913025
and that is, obviously, not correct.
So how do I calculate what to send to the payment system to get the desired value?
I have come so far, that it is the following equation:
X - (X * 0.0245) - 1.10 = Y
Here, X is the desired amount to send to the payment system and Y is the amount the customer has shopped for (100), therefore:
X - (X * 0.0245) - 1.10 = 100
But how do I solve that to find out what X is?
Thanks in advance