
Originally Posted by
ghanasyam
. . . adding <input type="hidden" name="amount" value="170.00"> with button code.It wasnt with the actual code.I added it to check whether i can change the actual fixed amount of 300 USD TO 170 USD . . .
Well, did that experiment work? If so, you can do this:
Code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="325KDMR5R82CU">
<label>Name Your Price: <input type="text" name="amount" value="170.00"></label>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
But that means that the user could enter like 2.00 for 300.00 item.
And, as I said, I forget whether or not you can change a hosted button in that manner. If not, you have to make a normal button and save its code to your page and change its amount input to the one shown in the above code.
Bookmarks