Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  PayPalSubscription.aspx -- UNsubscribe?
Previous Previous
 
Next Next
New Post 7/8/2008 10:30 AM
Resolved
User is offline CJones
37 posts
10th Ranked


PayPalSubscription.aspx -- UNsubscribe? 

I figured out how to call PayPalSubscription.aspx and send the roleID via querystring to have the user subscribe to a role, but I can't get the UNsubscribe to work.

It looks like paypalsubscription.aspx.vb is using a "cancel" variable from the querystring to determine if the user is being unsubscribed, but I can't get it to accept the value I send to it.  I have tried http://www.mydomain.com/admin/sales/paypalsubscription.aspx?cancel=1   and cancel=true   and neither work.  Is there any documentation out there on what variables and in what form these controls need to make them work?

Any ideas?

Thanks,
CJ

 

 
New Post 7/8/2008 2:10 PM
User is offline Baatezu
195 posts
9th Ranked


Re: PayPalSubscription.aspx -- UNsubscribe? 

I'll start by saying that I've never used this part of DNN, and this is the first time I've looked at the DotNetNuke/admin/Sales/PayPalSubscription.aspx.vb file.

BUT - That being said

It looks like you just need to have something set in the cancel query string. As well as the roleid. It looks like it pulls everything else from non-URL sources.

What are the full URL's you are trying to test the cancel feature with?
Have you double checked that the paypal settings are set and saved in the system?
Are you logged in when testing this?

 
New Post 7/8/2008 2:33 PM
User is offline CJones
37 posts
10th Ranked


Re: PayPalSubscription.aspx -- UNsubscribe? 

Good grief.  I cannot believe how big of an idiot I am.  For some reason, I was using " ; " instead of " & " between the roleID and cancel values in the querystring.  You are right, it's simply taking values from the querystring.

 

 
New Post 7/13/2008 11:58 AM
User is offline RDO
56 posts
10th Ranked


Re: PayPalSubscription.aspx -- UNsubscribe? 

CJ,

From your post, it looks like you have figured out how to do what I am trying to figure out. I am needing a way to allow users to pay for a subscription, and on confirmation, have them automatically added to a role. I was looking at the integrated DNN method, but I do not like that it can not be displayed on any page. Also, I want to be able to input the role name dynamically instead of a list of them. (The site is going to have MANY different roles)

I have been trying to look at the files in the admin/sales folder but I have not been able to pick apart how to recreat the funcionality of having a button send the info to paypal and get the response back.

Can you please provide any  info/tips/code examples/links to documentation/anything

Thanks

 
New Post 7/14/2008 9:21 AM
User is offline CJones
37 posts
10th Ranked


Re: PayPalSubscription.aspx -- UNsubscribe? 

 RDO wrote

CJ,

From your post, it looks like you have figured out how to do what I am trying to figure out. I am needing a way to allow users to pay for a subscription, and on confirmation, have them automatically added to a role. I was looking at the integrated DNN method, but I do not like that it can not be displayed on any page. Also, I want to be able to input the role name dynamically instead of a list of them. (The site is going to have MANY different roles)

I have been trying to look at the files in the admin/sales folder but I have not been able to pick apart how to recreat the funcionality of having a button send the info to paypal and get the response back.

Can you please provide any  info/tips/code examples/links to documentation/anything

Thanks

The way I have things running now (I'm using VWD Express 08 for writing code):

I have a module that contains the following an ImageButton labeled "Join" (Subscribe) whose properties for "onclick" calls the following:

--------------------

Protected Sub RegisterandJoin(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnJoin.Click
            If Not IsInRole("Members") Then
                'Determine RoleID for appropriate Role name to subscribe user to
                Dim objRoles As New RoleController
                Dim objroleinfo As RoleInfo = objRoles.GetRoleByName(PortalSettings.PortalId, "Members")

                If IsInRole("Registered Users") Then
                    'If user is already a 'Registered User' but not in a subscription based role, then send the user directly to PayPal to purchase membership.
                    Response.Redirect("http://www.yourdomain.com/admin/sales/paypalsubscription.aspx?roleID=" & HTTPPOSTEncode(objroleinfo.RoleID))
                Else
                    'Send the user to registration page then to PayPal to purchase membership.
                    Response.Redirect("http://www.yourdomain.com/Home/tabid/36/ctl/Register/Default.aspx?returnurl=%2fadmin%2fsales%2fpaypalsubscription.aspx?roleID=" & HTTPPOSTEncode(objroleinfo.RoleID))
                End If
            End If

        End Sub

-------------------------

It is possible to write all of the 'create user' code by using the core DNN objects, which is what I did until I realized I could just redirect the user to the regular DNN Registration page, which will accept a "returnURL" string.  That 'returnURL' string can be used to call the PayPalSubscription.aspx which accepts the RoleID of the role that you want to add the user to once they are registered.  The registration URL will be different according to your domain.  You can find the URL for your domain by clicking on the "Register" link and simply copy the address from the address bar.

I'm not sure what you mean about entering dynamic roles to have the user subscribed to -- do you want to have a dropdown list, button list, certain roles according to certain pages, etc?  If you can find a way to nail down which role the user will be subscribed to, you can adjust the "Dim objroleinfo As RoleInfo = objRoles.GetRoleByName(PortalSettings.PortalId, "Members")" line to be changed to the correct role name (Members in my case) according to the appropriate situation.

OTOH, you can simply put the RoleID directly into "paypalsubscription.aspx?roleID=" & HTTPPOSTEncode(objroleinfo.RoleID))" without having to use the objRoleInfo stuff.  I like to determine the roleID each time to prevent any future mishap if the database gets shuffled around.

If you're using VWD 08, one handy tool I found was the "Object  Browser" (View -> Object Browser).  That lists all of the DNN and .NET objects availabe in your website.  It has come in very handy over the past few weeks.

If you have any more questions, feel free to ask.  There doesn't seem to be much info available out there regarding this area of DNN.

CJ

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  PayPalSubscription.aspx -- UNsubscribe?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


WDK Solutions
Quality modules for the DotNetNuke community. Check out our 'wild' modules!
wdkns.com
UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk
TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP