Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0PayPalSubscription.aspx -- UNsubscribe?PayPalSubscription.aspx -- UNsubscribe?
Previous
 
Next
New Post
7/8/2008 12:30 PM
 

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 4:10 PM
 

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 4:33 PM
 

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 1:58 PM
 

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 11:21 AM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0PayPalSubscription.aspx -- UNsubscribe?PayPalSubscription.aspx -- UNsubscribe?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out