title: PayPal - Users can change price before checkout
body: <p>I'm having a small problem on my website. I want to make it so right before users check out they can change some options to their own liking, which edits the final price. I have this working, but the user can easily inspect element and change the amount to pay on the PayPal button. This is my HTML for the button right now: </p>
  
  <pre><code>&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"&gt;
    &lt;input type="hidden" name="cmd" value="_xclick"&gt;
    &lt;input type="hidden" name="business" value="agservers7@gmail.com"&gt;
    &lt;input type="hidden" name="lc" value="US"&gt;
    &lt;input type="hidden" name="item_name" value="VPS"&gt;
    &lt;input type="hidden" id='priceValue' name="amount" value="0.99"&gt;
    &lt;input type="hidden" name="currency_code" value="USD"&gt;
    &lt;input type="hidden" name="button_subtype" value="services"&gt;
    &lt;input type="hidden" name="no_note" value="0"&gt;
    &lt;input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest"&gt;
    &lt;input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"&gt;
    &lt;img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>So, for price updating, I do this in JavaScript. The <code>updateFinalPrice()</code> function is called when the user changes the options that they have:</p>
  
  <pre><code>  function updateFinalPrice(){
      var mainPrice = 24.99
      var finalPriceElement = $("#finalPrice")
      var finalPrice = addedRAM + mainPrice
      finalPrice = (finalPrice).toFixed(2)
      finalPriceElement.text("$" + finalPrice)
  
      $('#priceValue').attr("value", finalPrice) // Changes amount value of paypal button
  }
  </code></pre>
  
  <p>So this works overall, but once the user has set all their options, they could just change the value of the amount input to whatever they want to pay, which is clearly an issue.</p>
  
  <p>I understand I could do this on the server, but I don't understand how to go about doing that when the price of the item changes depending on what the user sets their options to.</p>
  
  <p>A good example of what I am looking for can be found <a href="https://www.nfoservers.com/order-virtual-dedicated-server.php" rel="nofollow">here</a>. However I want it so right after the user has set the options to their liking, they click the Paypal button, without being able to change the price. Any help is realty appreciated. </p>