1

I'm trying to add a donation page with paypal integration. It works perfectly fine. But what I want to add is to first sign the form from my site and then send it to paypal as well as the selected amount of donation. I've also trid to put this code <input type="hidden" name="amount" value="<?php echo $total; ?>"> as per my research. But it's still not working. Please see my code below for your review/reference.

Code

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="QWEVB36VTJYEG">
    <input type="hidden" name="amount" value="88.00">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

The result would be just like this: (Blank Value) (The value must be 88.00) enter image description here

Blues Clues
  • 1,694
  • 3
  • 31
  • 72

1 Answers1

0

As far as I know, donations on Paypal can't be restricted to one single value. The amount input is ignored, to be sure that people who will donate are not being manipulated and forced to pay a price they did not choose.

However, if you want to propose some fixed prices, here is a Paypal Community code which will help you doing that.

EDIT: Here is a StackOverflow answer which is pretty clear and confirms my thoughts.

Louis 'LYRO' Dupont
  • 1,052
  • 4
  • 15
  • 35