?
Solved

Payapal pass-through variables

Posted on 2013-12-21
1
Medium Priority
?
552 Views
Last Modified: 2016-03-24
Hi

I'm trying to use pass-through variables with paypal - the variables 'item_number' and 'custom'.
this is my paypal form:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" id="foo">
      <input type="hidden" name="cmd" value="_s-xclick">
      <input type="hidden" name="hosted_button_id" value="XXXXXXXXXXXX">
      <Input type="hidden" name="item_number" value="<%=idnum%>"/>
      <Input type="hidden" name="custom" value="<%=gender%>"/>
      <input type="image" src="https://www.paypalobjects.com/he_IL/IL/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal">
      <img alt="" border="0" src="https://www.paypalobjects.com/he_IL/i/scr/pixel.gif" width="1" height="1">
</form>

it seems that the transaction is going OK, but when I do:
<%=request("custom")%>
<%=request("item_number")%>
either at my success.asp page or cancel.asp page - I don't get any values.

What am I doing wrong?
0
Comment
Question by:arielbf
1 Comment
 
LVL 11

Accepted Solution

by:
Andrew Angell earned 2000 total points
ID: 39733918
You're using a hosted button, so details like that would have be included in the button creation wizard.  Alternatively, you can go back into the button to edit it and disable the "save button at PayPal" option.  Then you can add extra parameters to the button code and they'll pass through as expected.  

That said, if you say you're not getting ANY values then you may need to enable PDT/Auto-Return in your PayPal account profile.  I would recommend using IPN (Instant Payment Notification) instead, though, as there's no guarantee the user will make it back to your site even with Auto-Return enabled.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

How important is it to take extra precautions to protect your online business? These are some steps you can take to make sure you're free of any cyber crime.
This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In th…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Suggested Courses

830 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