0

I have visited related questions here but i need more specific answer.

I have hooked into the user registration form and i have added a custom submit handler for user registration before the user drupal core registration function.

I want to implement paid registration. I have visited Paypal IPN documentation but they said the require a return url.

Actually i am confused in the whole process. I want to know actual steps to implement payment api of paypal then if the user has paid the drupal core submit function should run otherwise i'll die the script.

Thanks

1

Rather than try to sell access to site registration, it might be worth considering allowing users to create a basic account and then pay for access to content based on role. Whether you are using Ubercart or Commerce, you should be able to create a Rule that will grant a user a role if their order contains a specific product and payment has been made. You can also use Rules Scheduler to create a time-based registration. Initially this might not sound like what you want, but the effect is the same - an anonymous user enters their email on the checkout page and is redirected to PayPal. On their return, they are granted a role that allows them access to content. If payment failed, they just have a user account that has no access to content.

  • You are right but because of lack of time i cannot jump into ubercart and rules module to learn i have to deliver it as soon as possible this is because i am trying to do it custom way. – user38296 Oct 20 '14 at 10:24
  • You can have Ubercart set up in half an hour, and the Rules configuration will probably take you an hour to learn. No coding involved. Also, you'll find it easier to get help with Rules than with a custom submit handler. Is your submit handler in your own module or are you changing your installation of Drupal? – griz Oct 20 '14 at 10:34
  • It is in my module. – user38296 Oct 20 '14 at 13:19
  • Ok, it's good that you're not hacking core. I honestly think you'll be better off using Ubercart as there is a PayPal module that handles IPNs. – griz Oct 20 '14 at 20:02
  • Thanks, For now i have made a custom module that handles all the operations. I'll surely have a look at Ubercart and Rules – user38296 Oct 21 '14 at 12:54
3

If this is an activity that you'll be repeating, like hosting events on a regular basis, I would step it up a notch and add CiviCRM to the Drupal installation. It will increase the complexity of your site by adding a new administrative area where you would manage the CRM components (at this point events and Payment Processors) but that additional complexity will simplify managing them.

Out of the box it's set for managing events with PayPal; During setup you're prompted to go through a checklist. One of those items is Payment Processor. Set it to PayPal, follow the prompts and it just pretty much works.

0

It turns out you don't even need to get to grips with Rules. They've made it very easy for you: http://www.ubercart.org/docs/user/30477/selling_site_access_roles

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy