views:

32

answers:

2

I want write a PHP registry code That when a User registried than go to PayPal site and give some money to us and after her payment , her account activation in our site Automatically . what am i going to do ? Thanks in Advance .

A: 

Look into Paypal's IPN functionality.

Here is the link to Paypal's IPN PHP API setup that they provide. There should be plenty of snippets / tutorials available from Google though.

EDIT

Also a great resource is http://developer.paypal.com it gives you access to a sandbox to setup test accounts with money etc to test the functionality of your newly implemented system before you send it live.

Brad F Jacobs
yeah i seen IPN but they doesn't told how we can activation our user Automatically !! May you help me ? Thanks .
Eve
You would activate it through the IPN page setup in your paypal account. When a user sends money, paypal send data to your ipn page designated there which alerts you and provides verification of the transaction. If that is all gravy, you would set the user to be activated there.
Brad F Jacobs
+1  A: 

Check out Paypal's Payflow Link : https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/howto_gateway_payflow_link

The user on your website clicks the Paypal buy button, gets transferred to Paypal to do their payment, and then returns to your website (wherever you specify) to finish.

rlb.usa
One correction. If you have the paypal IPN set in your paypal profile, Paypal will actually send the information to that page. This way if the user closes the webpage without clicking the return to yoursite, the data of the transaction still gets completed and the action is taken as necessary by your site. So the flow is : Paypal button gets pushed -> Transfered to Paypal -> Payment Made -> IPN Page Requested with Tansaction Data by Paypal -> User chooses to go back to your site or navigate away etc. Will +1 this tomorrow for the flow link.
Brad F Jacobs