dipanshu
dipanshu

Reputation: 197

How to pass dynamic amount in paypal buy now button

I have made a paypal buy now button , but is not taking dynamic amount which i am sending by form like amount variable in input type hidden

It only takes price which is set while creating form.

Please give me solution , so that i can pass dynamic price and get payment for it.

Upvotes: 0

Views: 3744

Answers (2)

Bathsheba
Bathsheba

Reputation: 51

As of June 29, 2017 I see this not working. Paypal has again changed its rules, and I don't think it any longer accepts hidden HTML fields in the form submission: they must be set in the button editor at Paypal.

Upvotes: 4

dipanshu
dipanshu

Reputation: 197

Finally my this code works now

  <form action='https://www.paypal.com/cgi-bin/webscr' method='post' name='form'>
  <input type='hidden' name='business' value='[email protected]'>
  <input type='hidden' name='cmd' value='_xclick'> 
  <input type='hidden' name='item_name' value='itemname'>
  <input type='hidden' name='item_number' value='2'>
  <input type='hidden' name='amount' value='2 0'>
  <input type='hidden' name='no_shipping' value='1'>
  <input type='hidden' name='currency_code' value='USD'>
   <input type='hidden' name='cancel_return' value='http://cancel.com'>
     <input type='hidden' name='return' value='http://return.com/'>
   <input type="image"   src="https://paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit">
</form>

Upvotes: 4

Related Questions