![]() |
|
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. |
| |||||||
| 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. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| 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? | |||
| Featured Websites | ||||
|
![]() |
| Tags: paypal, php4, variables |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
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 | ||||
|