Solved

I need a URL for a paypal donation with the purpose field pre-populated

Posted on 2014-11-03
12
333 Views
Last Modified: 2016-03-24
I need a URL for a paypal donation with the purpose field pre-populated.

I want to have a URL for paypal DONATIONS that can have default text for the "purpose" field in the URL so that when the user clicks on it and is presented with the donation page, that field will be pre-populated with my designated text.

How can I do this?  What would that URL look like?
0
Comment
Question by:cashonly
[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
  • 6
  • 6
12 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 40419599
I assume you're POSTing data, correct? Below is a list of the fields that can be passed

https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_prepopulate_outside

You can try adding the purpose field in that code as well, just add the html equivalent name to the list of hidden fields
0
 

Author Comment

by:cashonly
ID: 40419647
Don't know about POSTing, I'm just creating a link that can be on a facebook post that someone can click on.

How EXACTLY is the field passed in?
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40419684
I assumed you were creating a form and sending the data the way...

I was able to find the lit of variables (see link below) that can be used. Do a Ctrl-F on the page and search for "service" and that may give you direction.

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

can you give an example of the link (take out the domain name) you have so far?
0
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!

 

Author Comment

by:cashonly
ID: 40419801
This is what I use now:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WWJSGZXPU2DL4
(feel free to donate if you like hahahaha!)

It takes the user to the donation page, but I would like to somehow pass in some text that will populate the "Purpose" field.

Any ideas?
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 40419813
if you look at the html source, the purpose field is called "item_name", so maybe something like this:

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WWJSGZXPU2DL4&item_name=abcdef

actually, I just tried it and it worked, as long as you don't want the field to be editable...
0
 

Author Comment

by:cashonly
ID: 40419828
Hmmmm... that is good, but I think I need it to be editable, unless I can figure out how to put another field on that donation page where they can enter free form text.
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40419899
I don't think you can make it editable, you're better off going into PayPal and adding an option free text field
0
 

Author Comment

by:cashonly
ID: 40420725
OK,

I tired adding an option field by putting this in the advanced items box:
on1=Photonum

Then, I added this to the end of that URL:  &Photonum=1234

And while the word "Photonum:" showed up, the 1234 didn't show up anywhere.

If I put the following in the advanced items box:
on1=Photonum
os1=1234

Then the 1234 did show up after the word Photonum

I need a way to pass something in so I can see it when I look at the donation.  Any ideas?
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40421774
I don't see any other field on the form, did you take it out?

this seems to be getting away from the original purpose of this question, which is to pre-populate the PURPOSE field, which we did. I'm not extremely familiar with building paypal forms, you may want to close this question down and ask a fresh one so that it gets some new eyes on it, or we can continue to try to piecemeal a solution for you, I'm fine either way.
0
 

Author Comment

by:cashonly
ID: 40422264
Good point.  I'll do that.  You've been a big help.
0
 

Author Closing Comment

by:cashonly
ID: 40422268
You've been very helpful, thank you!
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40422271
my pleasure! happy programming!
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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…

738 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