0

I have a paypal button that I've created using the hosted button option, which of course hides some of the button options.

I want to be able to change some of the variables, including item_name,item_number and amount. I've added these variables like so:

<input type="hidden" name="item_name" value="unique item name">
<input type="hidden" name="item_number" value="10015">
<input type="hidden" name="amount" value="60.00">

This changes the item_name, but not the item_number or the amount. most importantly is the amount, as this is variable across different items, which are being pulled in dynamically.

Any suggestions on what I'm doing wrong or how to fix?

Thanks

TH1981
  • 3,105
  • 7
  • 42
  • 78

1 Answers1

0

As far as I understand, the hosted option doesn't allow these variables to be passed in (hence they are really only useful for a small number of buttons, i.e. donations with values that don't change often and the amount of the payment isn't crucial.

What I would recommend is that you make your buttons using the encrypted method (using the PayPal Button Generator API) which prevents these 'hidden' values from being changed and gives you full control.

My answer over at Dynamic PayPal button generation - isn't it very insecure? explains how to use it, and also allows you to dynamically generate the amount, item name and numbers as required.

Community
  • 1
  • 1
lethalMango
  • 4,433
  • 13
  • 54
  • 92