Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 4:13 PM   #1
tsagoii
 
tsagoii's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP4 + PAYPAL + Variables

Hi all,

After browsing forums for a topic that could answer my question, i decided
to post a detailed post about my questions.

Here it is;

Goal: offer credit/points package to members. Various package various price.

Brief info : Credit/points package will allow members who have purchased
them to be used in restricted section or parts of the website. Once the
credit/points are at 0, give the member the opportunity to purchase more
points using PAYPALŪ payment system.

Note: Before being able to purchase any points, the user would have to be a
fully registered member of the site first.

What i plan on using :

Mysql Database
PHP4
HTML
No SSL (for now)

The system i want to input :

Using Paypal "Buy now" button or a customized image to associates the
credit/points package to a member and add it to their account once payment
is fraud/check and approved.

Example:

1 - 100 credits 5.00$ ( associated to buy button 1)
2 - 150 credits 8.00$ ( associated to buy button 2 )
3 - 300 credits 10.00$ ( associated to buy button 3 )
4 - 400 credits 12.00$ ( associated to buy button 4 )

I would like to pass some variables related to the members while they
purchase credits for verifiactions purposes and of course to add the credits
to the appropriate member once the payment is approved. I need to keep track
of those var and be able to access them during the whole payment process.

Now as a graphic artist, programming is a new world for me, i have chosen
PHP/MYsql as my new ground to explore and i still got lot of exploring to do
, so bare with me :-)

From the html generated after creating a buy now button. I would like to add
hidden fields where i intend to store extra variables which like i
mentionned above , will be related to the member.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="seller@email.com">
<input type="hidden" name="item_name" value="myitemid">
<input type="hidden" name="item_number" value="myitem_number">
<input type="hidden" name="amount" value="10.00">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return"
value="http://www.mysite.com/memberdir/thankyou.php">
<input type="hidden" name="cancel_return"
value="http://www.mysite.com/memberdir/cancel.php">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="puid" value="<?php print '$puid'; ?>">
<input type="image" src="http://mysite.com/images/mybuybutton.gif"
border="0" name="submit" alt="Click here to buy 100 member points">
</form>

Now using my previous young experience with PHP4, i would like to add these
hidden fields using php to dynamically at the appropriate member email and
username:

<input type="hidden" name="member_mail" value="<?php echo '$member_mail';
?>">

<input type="hidden" name="member_username" value="<?php echo
'$member_username'; ?>">

Now are the question that raises in my brain:

Can i do this?
Is this the right way to do this?
Will Pay Pal get, process and keep those vars and return them in the return
URL?
If so, will PayPal keep the same var name?

can i even more extra variables using the same method?

Now the IPN, (correct me if im wrong) if i understood correctly from what i
read, it is basically the informations about the pruchase and the buyer
informations.

Im not familiar at all with this so let see if this makes sense. Can i use
that inforation and store it in a mysql database. Obviously i want to assign
the IPN info to the member who bought the credits and add those credits to
his/her account.

Now aside of the basic IPN infos, if i added the hidden fields , will the
IPN also include those extra var? so i can store them and from that info add
the credits to the member account.

Can anyone give me some advises on this post, or point me to an efficient
tutorial site about identical process using PHP?



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , ,




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

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Variables Jan V.Pedersen PHP 4 07-01-2007 4:17 PM
Passing variables Gilbert Schroeder PHP 7 07-01-2007 3:59 PM
Help installing Ming with PHP4.3.2 eric PHP 0 07-01-2007 3:18 PM
Use PayPal - Pay and get paid by PayPal Per Sundberg Building An Internet Business 0 05-29-2007 3:06 AM
enable domxml in php4 kkadrese@yahoo.com PHP 3 05-20-2007 6:33 PM


Featured Websites




All times are GMT +1. The time now is 12:40 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98