Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
form to PayPal redirect with price variable
Old 01-21-2008, 02:48 AM form to PayPal redirect with price variable
Skilled Talker

Posts: 69
Trades: 0
Hi

I am trying to send each of my order forms to a separate PayPal payment page (or rather charge a separate amount). Does anyone know if it's possible?

Is there any variable I can set for 'amount' rather than building a new page for every fixed amount to be paid?


Thanks
Alex
alexd181 is offline
Reply With Quote
View Public Profile Visit alexd181's homepage!
 
 
Register now for full access!
Old 01-21-2008, 11:24 AM Re: form to PayPal redirect with price variable
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Use an IPN (Instant Payment Notification), or put the value in the return URL (for example, "file.php?price=1.25").

It really depends on what your planning to do ^^ In your case I would do the return url, the code should look like:
PHP Code:
<?php
$price 
$_GET['price']; // Get the variable from the URL.
if(is_numeric($price)){ // If it's a number, otherwise they may be hacking you.
echo "Thanks for your payment of {$price}";
} else { 
// If it's a possible hack...Could be by error though.
echo "Thank you for your payment.";
// You may want to log the IP/Session here.
}
?>
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE

Last edited by rogem002; 01-21-2008 at 11:28 AM..
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to form to PayPal redirect with price variable
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09780 seconds with 12 queries