Solved

can't seem to pass amount to Paypal correctly

Posted on 2011-02-17
3
511 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 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

19 Experts available now in Live!

Get 1:1 Help Now