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
- Best done in a multi-tab browser
- 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.
- Open another tab in same browser and navigate to your site
- Click on Registration link
- Enter required information - user email address MUST be an address setup in your PayPal sandbox as a buyer
- Click [Register] link.
- Login to PayPal Sandbox with the user credentials from a PayPal Sandbox buyer
- Click through PayPal screens.
- 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 |
|
|
| |
|
|
|
|
|
|
| |
|
|
|
|
|
|
| |
|
|
|
|
|
|