PayPal validation

I’m trying to make commercial registration via PayPal, but I can’t find any help about that. User shoul’d click ‘register’ than to be redirected to PayPal and after paying be returned to the site with ACTIVATED login and password. Does anyone know how to make thing like that?

When user redirect from paypal, paypal send back some values (and I thing some customs that you send) you may use them?

Paypal has a system known a IPN (Instant Payment Notification) that will return values to your website script so you can activate the registration automatically.

My suggestion would be to study the Paypal IPN module of one of the many open source shopping carts that are in the wild such as osCommerce.