Search the Community
Showing results for tags 'percentage'.
-
Hi there. I have been wandering around the tutorials and examples and trying to get a simple variable calculation done in the html code below but can't seem to get it right. The html code below works fine now to create a button for PayPal and submit an order. The problem is, I need the "amount_2" to actually be calculated to 2% of "amount_1". a simple, "amount_2" = "amount_1" * 0.02 This is to allow us to take payment with PayPal and add their merchant fees. Can anyone help please :-) ------------------------------------------ <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="accounts@freelanceswitch.com"> <input type="hidden" name="currency_code" value="AUD"> <input type="hidden" name="item_name_1" value="My Invoice"> <input type="hidden" name="amount_1" value="1885.00"> <input type="hidden" name="item_name_2" value="Merchant Fee"> <input type="hidden" name="amount_2" value="9999"> <input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> ------------------------------------------
- 2 replies
-
- paypal
- calculation
-
(and 2 more)
Tagged with:
-
Hello, I'm trying to make a method that creates objects of a parameterized type randomly, but also to store the hashCode of different objects created and if at any time the percentage of different objects is less than 50% throw an exception. This last part is where I've gotten stuck. I have created a population property where I store the different hashCodes and update it in the method adding the new hashCode from the new object. But I don't know how to do for to know if the percentage of different objects is less than 50%. See if someone can help me out. Regards!