Web Hosting Talk







View Full Version : Creating payment system with PHP & MySQL


zgoku
01-19-2003, 01:54 PM
I'm trying to create a payment system, where a customer would fill out a form, choosing hosting packages, etc from drop-down lists, fields, check boxes, etc. Then the customer would fill in his paypal info and hit submit. What I want to happen is for some of the data in the fields the buyer filled out to be inputted into a MySQL database table, and then for paypal to creat the subscription, and then for WHM to automatically create the account, sending an automatic welcome e-mail to the buyer when the account is ready.

What I don't understand is how this is going to work because if I understand it right, the form can only pass variables to either paypal OR to the database.

Also, when paypal returns the IPN, how would I go about starting the account creation?

Any help would be greatly appreciated.

Thanks
-z

Wolfy
01-20-2003, 08:07 AM
There is no reason why your PHP code cannot perform more than 1 action with the data your customer submits. Rather than submitting the info directly from the form to PayPal, run it through an intermediate PHP page, that then does all the actions you want, including updating your database and sending info to PayPal.

I am not familiar with how PayPal returns the IPN, so cannot make a suggestion for this.

DonGans
01-20-2003, 09:22 AM
Hi there,

As a PHP Consultant/Developer I'd be willing to setup a little system that will setup the hosting only AFTER the paypal payment has been confirmed.

Regards,

zgoku
01-20-2003, 12:18 PM
Originally posted by Wolfy
There is no reason why your PHP code cannot perform more than 1 action with the data your customer submits. Rather than submitting the info directly from the form to PayPal, run it through an intermediate PHP page, that then does all the actions you want, including updating your database and sending info to PayPal.

I am not familiar with how PayPal returns the IPN, so cannot make a suggestion for this.

this is what I was thinking, but how would I put the info into the database on the intermediate page? (I decided not to use IPN....looks to be a royal pain to set up)

zgoku
01-20-2003, 01:15 PM
nm, I got it now