NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Simple Paypal Order Form

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 07-20-2006, 08:30 PM THREAD STARTER               #1 (permalink)
Senior Member
 
Camron's Avatar
Join Date: Jan 2006
Location: Portland, Oregon
Posts: 2,100
Camron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud of
 



VA Tech Memorial 9/11/01 :: Never Forget Cancer Survivorship Child Abuse

Wink Simple Paypal Order Form


Hello everyone

I am not much of a PHP coder but I know some, so I decided to put toghether a small script for people selling items who are tired of making a subscription page for each item! This way you create the url, put it on your site and the payment is sent to you! Nifty, huh?

Here it goes,
Code:
<?php
// Time for item information
$Item=$_GET['Item'];
$Price=$_GET['Price'];
$Currency=$_GET['Currency'];
$Shipping=$_GET['Shipping'];
$Time=$_GET['Time'];
// Time for the sellers information
$PaypalEmail=$_GET['PaypalEmail'];
$CompanyName=$_GET['CompanyName'];
$WebsiteURL=$_GET['WebsiteURL'];


?>
Thank you for choosing to purchase from <a href="<?php echo "$WebsiteURL"; ?>"><?php echo "$CompanyName"; ?></a>

<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo "$PaypalEmail"; ?>">
<input type="hidden" name="currency_code" value="<?php echo "$Currency"; ?>">
<input type="hidden" name="no_shipping" value="<?php echo "$Shipping"; ?>">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="a3" value="<?php echo "$Price"; ?>">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="<?php echo "$Time"; ?>">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
Now this is what you do,
????: NamePros.com http://www.namepros.com/code/219265-simple-paypal-order-form.html

1) Put all this code into paypal.php (or what ever page you want, make sure your website supports PHP and you have it ending in a .php extention)
2) Here is the tricky part, making the url.

Here is a example of what the url will look like,

Quote:
http://www.mydomain.com/paypal.php?Item=Hosting&Price=5.00&Currency=USD&Shipping=0&Time=M&PaypalEmail=bluvapor@gmail.com&CompanyName=YourCompany&WebsiteURL=http://www.yourdomain.com
Ok so,
????: NamePros.com http://www.namepros.com/showthread.php?t=219265

Item - Shows what's the items name, for example: Hosting Plan Basic
Price - This is pretty explanitory, do not include the $, this comes in on the currency part
Currency - Put the Currency you want to accept
Shipping- Leave to 0 if no shipping, or put too 1 if there is shipping included
Time - This is the recuring payment part, put M for montly, Y for yearly, etc
PaypalEmail - This is your paypal email
CompanyName - Self Explanitory
WebsiteURL - Self Explanitory

The whole script is basically self explanitory, but I made it as simple as I could for the new end user to paypal subscriptions.

If you like the script, rep is appreciated

Thanks,
Camron
__________________
HostingFuze.com Premium Master Reseller Services | 99.9% Uptime Guaranteed SLA | Starting at $4.95/mo
Basic Reseller Hosting @ HostFz.com - Services starting as low as $1.95/mo!
Camron is offline  
Old 10-27-2006, 07:11 PM   #2 (permalink)
NamePros Regular
Join Date: Oct 2006
Location: Lafayette,LA
Posts: 354
animeorb is a jewel in the roughanimeorb is a jewel in the roughanimeorb is a jewel in the rough
 




Hmm, I might find a few uses for this.

Edit: Do you think you could make a front end for this. Especially one that does not show the price and etc. that someone could change.
__________________
Chemcast Free Online Radio
Last edited by animeorb; 10-28-2006 at 06:10 PM.
animeorb is offline  
Old 11-16-2006, 01:54 PM   #3 (permalink)
Senior Member
 
mtorregiani's Avatar
Join Date: Jul 2006
Location: Montevideo, Uruguay
Posts: 1,601
mtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to behold
 


Cancer Survivorship
Thanks
Rep Added
mtorregiani is offline  
Old 11-16-2006, 02:55 PM   #4 (permalink)
NamePros Regular
 
ablaye's Avatar
Join Date: May 2006
Location: WebmasterGround.com
Posts: 865
ablaye is on a distinguished road
 



What about notification that wether or not the payment was succesful?? You should add another script that verifies wether or not the payment was succesfull.
ablaye is offline  
Old 11-16-2006, 05:29 PM THREAD STARTER               #5 (permalink)
Senior Member
 
Camron's Avatar
Join Date: Jan 2006
Location: Portland, Oregon
Posts: 2,100
Camron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud of
 



VA Tech Memorial 9/11/01 :: Never Forget Cancer Survivorship Child Abuse
Like I said this is very basic. You will get an email from paypal saying the money has been sent. This is a tutorial, and is VERY basic (when I mean basic I mean this is the mother of all basic scripts).
__________________
HostingFuze.com Premium Master Reseller Services | 99.9% Uptime Guaranteed SLA | Starting at $4.95/mo
Basic Reseller Hosting @ HostFz.com - Services starting as low as $1.95/mo!
Camron is offline  
Old 11-16-2006, 11:54 PM   #6 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 390
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




ablaye, that would be a paypal ipn script and that is not what this is. Nice script
beaver6813 is offline  
Old 11-17-2006, 11:03 AM   #7 (permalink)
Senior Member
 
mtorregiani's Avatar
Join Date: Jul 2006
Location: Montevideo, Uruguay
Posts: 1,601
mtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to behold
 


Cancer Survivorship
So, to buy the item, there must be a link to http://www.mydomain.com/paypal.php?I...yourdomain.com ???
mtorregiani is offline  
Old 11-17-2006, 11:05 AM   #8 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 390
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




Originally Posted by mtorregiani
So, to buy the item, there must be a link to http://www.mydomain.com/paypal.php?I...yourdomain.com ???
Heh, looking at that it might just be easier to use a paypal button generator for payment
beaver6813 is offline  
Old 11-17-2006, 11:09 AM   #9 (permalink)
Senior Member
 
mtorregiani's Avatar
Join Date: Jul 2006
Location: Montevideo, Uruguay
Posts: 1,601
mtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to beholdmtorregiani is a splendid one to behold
 


Cancer Survivorship
Originally Posted by beaver6813
Heh, looking at that it might just be easier to use a paypal button generator for payment
What's that?
mtorregiani is offline  
Old 11-17-2006, 12:02 PM   #10 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 390
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




Originally Posted by mtorregiani
What's that?
Basically the same as this, but it used javascript to do all the stuff that the page Camron created does. Meant less coding Don't get me wrong though, i like this script
beaver6813 is offline  
Old 11-17-2006, 04:15 PM THREAD STARTER               #11 (permalink)
Senior Member
 
Camron's Avatar
Join Date: Jan 2006
Location: Portland, Oregon
Posts: 2,100
Camron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud of
 



VA Tech Memorial 9/11/01 :: Never Forget Cancer Survivorship Child Abuse
I did this so you can have multiple items on one page, instead of making a paypal page for each item you are selling.
__________________
HostingFuze.com Premium Master Reseller Services | 99.9% Uptime Guaranteed SLA | Starting at $4.95/mo
Basic Reseller Hosting @ HostFz.com - Services starting as low as $1.95/mo!
Camron is offline  
Old 11-17-2006, 09:42 PM   #12 (permalink)
NamePros Expert
Join Date: Nov 2004
Location: Esse quam videri
Posts: 8,316
IAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond reputeIAmAllanShore has a reputation beyond repute
 

Member of the Month
January 2005Member of the Month
February 2007
Ethan Allen Fund Child Abuse Child Abuse Child Abuse Child Abuse Save The Children Save The Children Child Abuse Child Abuse Child Abuse Child Abuse VA Tech Memorial Child Abuse Child Abuse Child Abuse Child Abuse Child Abuse Child Abuse Child Abuse Child Abuse Child Abuse Child Abuse
Camron,
Great work

I was actually looking for one of these today, and I find it right here close to home!

Thank you!

-Allan
__________________

Something Witty This Way Comes...
IAmAllanShore is offline  
Old 11-18-2006, 12:06 AM THREAD STARTER               #13 (permalink)
Senior Member
 
Camron's Avatar
Join Date: Jan 2006
Location: Portland, Oregon
Posts: 2,100
Camron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud ofCamron has much to be proud of
 



VA Tech Memorial 9/11/01 :: Never Forget Cancer Survivorship Child Abuse
Thanks Allan, I am currently working on a mysql version (php paypal shopping cart).

Thanks,
Camron
__________________
HostingFuze.com Premium Master Reseller Services | 99.9% Uptime Guaranteed SLA | Starting at $4.95/mo
Basic Reseller Hosting @ HostFz.com - Services starting as low as $1.95/mo!
Camron is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:52 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger