Solved

Payapal pass-through variables

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Filktering Alphabetically 8 41
IIS 7 and executing pages using localhost 16 24
Time comparison asp 1 20
SP converting date time to date and time separately 2 16
I recently read an article which suggested that 60% of businesses in the U.S. that process credit card details online in order to accept payment for goods or services were not Payment Card Industry security standards (PCI) compliant. This statement …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
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.

756 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