Discuss Pay to become a member php in the PHP Development forum on Dev Shed. Pay to become a member php PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
Posts: 2,907
Time spent in forums: 1 Year 1 Month 1 Day 21 h 22 m 28 sec
Reputation Power: 581
Not really very difficult just don't try to do everything at once. Start by creating a registration/login page and learn how to secure the pages that require login (plenty of tutorials on that). Once you have that working you can add a bit to your database that signifies if the user has paid and incorporate that into the login mechanism. Finally, you can add a payment method to your registration that sets that bit to bring it all together. The payment part will probably be the most challenging for a noobie but by the time you get there, you should have a pretty solid understanding of PHP and you can concentrate on the logic rather than the language.
Posts: 18
Time spent in forums: 9 h 22 m 31 sec
Reputation Power: 0
"I would suggest that register first then payment. Maybe you can store the registration data into database first, and with an extra column name 'valid' or 'paid', which default value of 0 So after the payment, normally the payment gateway will send back the notification of whether the transaction is valid or invalid, along with some data. For example, for paypal is Paypal IPN After verifying the transaction is valid, the 'valid' or 'paid' field is set to 1, mean the user has paid "
thats from another website which i bookmarked ...
a bit more clairty maybe .. ?
i mean basically its an html form.. php script and mysql databse and table ...
Posts: 2,907
Time spent in forums: 1 Year 1 Month 1 Day 21 h 22 m 28 sec
Reputation Power: 581
First you need to develop the database (table). Decide what information you want to store and design the schema.
Second would be the registration page that collects the user information and stores it in the database (HTML form and PHP).
Third is the login page that verifies the user information from the database (HTML form and PHP).
Fourth is to secure the pages that require a login to access.
Last is to add the payment method to the now working registration page.
As you go through this exercise you should be learning and using OOP and there are plenty of tutorials on that as well.
Posts: 18
Time spent in forums: 9 h 22 m 31 sec
Reputation Power: 0
thanks
i have been doing some little research on the php payment thing ..
after trying to implement it in a shopping cart with the help of paypal .. as an admin i get a notification from paypal .. and i get a notification via email
that is two notifications as a website administrator ...
now back to the trying to setup a pay for membership or pay for website registration
if the theoritical setup goes smoothly .. i get a notification from paypal ..
then i can validate the user in my database as an administrator ....
Posts: 163
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
From a coding point that would be the simplest but the worst way to do this. You should first learn php/MySql and utilize the PayPal XML Api to validate payments and pass data between your site and the paypal API.
Basically setup a simple register store the users data in a table then have another column to specify if they have paid for membership or an expiration date of their membership.
Quote:
Originally Posted by gether
thanks
i have been doing some little research on the php payment thing ..
after trying to implement it in a shopping cart with the help of paypal .. as an admin i get a notification from paypal .. and i get a notification via email
that is two notifications as a website administrator ...
now back to the trying to setup a pay for membership or pay for website registration
if the theoritical setup goes smoothly .. i get a notification from paypal ..
then i can validate the user in my database as an administrator ....
Posts: 2,907
Time spent in forums: 1 Year 1 Month 1 Day 21 h 22 m 28 sec
Reputation Power: 581
Depends on how many validations you get. I have a similar situation but I only get a validation once in a while so I set the bit in my database manually. It takes about 15 seconds. If you get many per day then obviously some kind of automation is needed.
Posts: 163
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
it is a very simple task in coding but many people are going to want instant access as soon as they pay through paypal and not want to wait for admin to validate. Also if you are doing alot of business then you are not going to want to manually validate
Posts: 163
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
Well there are many types of registration and login systems and most subscription systems the user will register without entering payment information. Their info will be saved into the database and a column `ActiveSubscription` will be false. after they have paid the `ActiveSubscription` will be true or equal to an expiration date.
Then the login will check for ActiveSubscription ==1 or ActiveSubscription < time()
And also on a side note. Do not come into our forums and insult the website while asking for help. Not a good idea and im not sure why im even answering your question. Alright?