• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

can't seem to pass amount to Paypal correctly

Hi!

I am trying to pass the amount (item price) a customer owe's to Paypal via a buy it now button.
The customer number works, but the amount is not being passed.
It displays fine on our site, but on PP's it just shows an item price entry field.
I think I might have the name variable wrong for amount (item price).
Any code suggestions would be apperciated.
 
       <td><input type="hidden" name="amount" value="@ud_PaymentAmount@" maxlength="10">Amount to pay&nbsp;</td>
       <td><input type="text" name="amount" value="@ud_PaymentAmount@" size="20"></td>

0
TrueBlue
Asked:
TrueBlue
  • 2
1 Solution
 
onemadeyeCommented:
I see that both of your <input> has the same 'name' amd same 'value'
Try to use just 1 only (remove the hidden one)

Or just use this (from your given codes);

<td><input type="text" name="amount" value="@ud_PaymentAmount@" size="20"></td>
0
 
TrueBlueAuthor Commented:
onemadeye,

I tried your suggestion, but it sitll is not sending the payment amount.
I believe the name of the variable has changed from amount to something else.
Any ideas?
0
 
onemadeyeCommented:
Nope.. you can still use 'amount'. Please check here for more clear answers (scroll to the bottom to see variations of PayPal payment form code).
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_buynow_buttons

And taken from that page, here is Sample HTML Code for a Basic Buy Now Button
The sample HTML code below illustrates a basic Buy Now button with these features:
* An item named “Hot Sauce–12 oz. Bottle”.
* An item price of $5.95 USD.
* PayPal calculates tax and shipping based on rates that you set up in your PayPal account.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="herschelgomez@xyzzyu.com">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="item_name" value="Hot Sauce-12 oz. Bottle">
<input type="hidden" name="amount" value="5.95">
<input type="hidden" name="currency_code" value="USD">
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online"> <img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form> 

Open in new window


I just checked it out and it is (still) working... so I assumed your problem might occurs because of something else not because of the wrong word 'amount' in your form.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now