Solved

Payapal pass-through variables

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now