?
Solved

Payapal pass-through variables

Posted on 2013-12-21
1
Medium Priority
?
516 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
[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
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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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:
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…

801 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