Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSharif Uddin
611 PointsPaypal
Anyone know how to add code to an existing Paypal button to add extra features like adding interest to the payment and creating a total. So we would have for example £10.00 + 5% = £10.50. What I am after is the ability for the cart to calculate the interest of 5% and add this to the total.
3 Answers
Ricardo Diaz
30,415 PointsWouldn't you be able to do those changes on your Paypal account? If I recall I was able to add additional charges by going to the advanced settings when I created the button. You can also just edit the button by going to your buttons.
Sharif Uddin
611 PointsThanks, I'll check this out.
Sharif Uddin
611 PointsI have looked on the PayPal site and cannot find any codes relating to what I want. Basically the following should happen.
Customer clicks on Buy Now, they enter the price of their journey and 4.9% will be added to the amount entered. So it will go like this:
Amount: £10.00 + 4.9% = £10.49.
I want this to happen automatically when the client enters the journey price in the payment page. Help?? I need the html or whatever codes that can do this. Please help.