Solved

can't seem to pass amount to Paypal correctly

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SVG and IE11 2 30
Do I need to force my browser to see my new Favicon 4 42
e commerce steps shown instead of self testing 2 51
Why is my select returning NaN 18 20
This article discusses four methods for overlaying images in a container on a web page
Businesses who process credit card payments have to adhere to PCI Compliance standards. Here’s why that’s important.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

739 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