Solved

Payapal pass-through variables

Posted on 2013-12-21
1
479 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 500 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
E-commerce is quite a gambling world, and you should never entrust your business to a lucky chance. In order to outrun your competitors in a race to attract as many customers as possible, you need to have a well thought-out strategy under your belt.…
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 video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

786 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