I don't know if this is the right forum to ask, but i need to have a % from an amount, and hope there is a formula to calculate it.
Example:
Some payment methods have a 1.8% fee of the total amount a user has in their shopping basket. Now i want, that if the user selects one of those payments, that they have to pay those 1.8%. but when i charge them 1.8% extra i will still have to pay for the payment method (not all, but still a bit)
e.g. a user has shopped for € 100. Now i ask 1.8% more, that's 100 x 1.018 = 101.80. But now i have to pay 1.8% of 101.80 to my "middleman". So i still only get 101.80 * 0.982 = 99.9676. Now that doesn't seem too bad, but i would like to have a percentage that i have to put on the price so i have the right amount left when i payed the fee to my "middleman".
i hope you get what i mean. I need a % = TOTAL_AMOUNT + 1.8% when i have to pay.