Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Only users with a "Sign Up Code" are allowed to sign up to the website. If they provide a valid signup code, they will be directed to a sign up page where they can provide user information, and PayPal processing is used to process the fee. On completion of payment an account is created.

How can I redirect user to Paypal?
How can I check the payment is paid by user?
How can I create the account if the user paid?

share|improve this question
4  
This is a very broad question. I would advise revising it into several specific smaller questions. –  Patrick Kenny Mar 27 '12 at 13:30
    
you changed the question completely !!! –  zhilevan Feb 25 at 8:18
add comment

3 Answers

Use the Drupal Commerce module.

  1. Add the Paypal payment method module; hook the login/register form to provide a different redirect page, or use the Rules module.
  2. You can look at the generated transaction.
  3. I would create the account anyway; set a flag, or something, for payed accounts.
share|improve this answer
add comment

My suggestion for you is to use hook_user($op) implement it in your module, and work with $op.
I personally have done work like you want with that hook.

share|improve this answer
add comment

I guess using Drupal commerce will be extra load(not sure).

Custom Way:

  • Over ride drupal registration form with your custom form
  • submit handler of your custom form will keep all submit value in session

How can I redirect user to Paypal?

  • You can create a custom payment script
  • commerce paypal module will be helpful to see the payment process.commerce paypal module has both off-site and on-site payment options.

How can I check the payment is paid by user?

  • IPN is what paypal returns after a payment(success or failure).
  • You can check IPN response to get the payment status. How can I create the account if the user paid?
  • If successful payment is done create user from session values using user_save() .
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.