Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

can't seem to pass amount to Paypal correctly

Posted on 2011-02-17
3
Medium Priority
?
531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

618 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