I have a PayPal form that needs a simple math equation added. A user enters an amout into my form and then is taken to the Paypal payment page to make the payment. The user inputs the amout in my form which is sent to Paypal as the amount to charge. I need the Paypal fee added to the amount. Just like what is done here on this site. So for example, if the user enters $10.00 in my form the "amount" varible that is actually sent to Paypal is $10.00 + 3.5% + .30 = $10.65.
Since my script also uses the IPN to let my script know how much the user has deposited, I believe that the IPN code would also need to be changed so that the user's account shows that they have deposited $10.00 and not $10.65.
I have uploaded my current form and IPN code.
Just to clarify. Actual Paypal fees to be added are 2.9% + .30 . Also, I just remembered that paypal would actually charge the fees ontop of the added fee so the actual fee would no longer be based on the $10.00 but on $10.65, so actually the fees added would need to be more.
Basically, I need to receive the total $10.00 when a user wants $10.00 credited to their account. So I need my script changed so that whatever the user inputs in the box, I always receive that exact amount after PayPal fees.