Register Login
Blogs    September 4, 2010
Blog Archive
 
DotNetNuke Books


 
Rarify Dotnetnuke Blog
Feb 15

Written by: Matthew Merchant
2/15/2009 5:04 PM 

Using Dynamic Registration, setup a subsrciption an annual subscription for user based on DotNetNuke Security Role. The user will be routed to PayPal to pay for a subscription service.

Pages needed to complete setup

  • A new Registration Page with DataSprings Dynamic Registration module installed
  • "Successful" landing page. Used when a new user has successfully completed the registration and made a payment through PayPal payment gateway
  • "Failed" landing page. Used when a users registration fails based on PayPal payment gateway.

PayPal Setup

Create developer sandbox account. The developer sandbox on PayPal can be used to test your business processes for submitting payments and then creating the users accounts and applying security roles.

PayPal Developer URL: http://developer.paypal.com

Dynamic Registration Events

  • New_Registered_Email
  • New_Registered_Redirect
  • New_Update_Subscribed_Email
  • New_Update_Subscribed_Role - assign the correct role to the User.
  • New_Update_Subscribed_Success_Redirect
  • New_Update_Subscribed_After_Cancel_Redirect - PayPal Event: Redirect After Cancel
  • New_Update_Subscribed_Failure_Redirect

 Links to pages with examples / forums

Testing with PayPal Sandbox account

  1. Best done in a multi-tab browser
  2. Login into PayPal Developer account (http://developer.paypal.com) with your Sandbox ID. Note: You can only be logged into the Sandbox once. If there is another browser open logged into PayPal Developer site, close that browser window first.
  3. Open another tab in same browser and navigate to your site
  4. Click on Registration link
  5. Enter required information - user email address MUST be an address setup in your PayPal sandbox as a buyer
  6. Click [Register] link. 
  7. Login to PayPal Sandbox with the user credentials from a PayPal Sandbox buyer
  8. Click through PayPal screens.
  9. You should land on Registration Successful page in your DNN portal.

Setting up a subscription on the Register page

Key is to setup a dynamic field with the short name "EnablePGateway". The field MUST be called "EnablePGateway". To activate the payment gateway, set the value to "TRUE". To bypass the gateway, set the value to "FALSE"

There are a number of input types you can use on your registration page.

  • Use Radio Buttons to allow user to select free registration or premium registration
  • Use DropDown boxes to display set of choices as well.

Create a completion event based on the "EnablePGateway" value

  • TRUE - open payment gateway and process
  • FALSE - register user on site with no payment
Event Name Event Purpose Fire Event On Gateway Response Landing Page Title Email (Y/N)
New_Update_Subscribed_Email Send welcome email to subscription user. New / Update Complete (Subscription)   Y  
New_Update_Subscribed_Role Add subscription user to security role. New / Update Complete (Subscription)      
New_Update_Subscribed_Success_Redirect Redirect user to Subscriber welcome page after they have successfully subscribed New / Update Complete (Subscription) Registration Successful    
             
             
             

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
 

 

 Copyright 2008 by Rarify Group   Terms Of Use  Privacy Statement