Solved

can't seem to pass amount to Paypal correctly

Posted on 2011-02-17
3
515 Views
Last Modified: 2012-06-22
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
Comment
Question by:TrueBlue
  • 2
3 Comments
 
LVL 5

Expert Comment

by:onemadeye
ID: 34921991
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
 

Author Comment

by:TrueBlue
ID: 34922130
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
 
LVL 5

Accepted Solution

by:
onemadeye earned 250 total points
ID: 34929415
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now