• Login
  • Register

DNN Forums

A community discussion page. We're starting from scratch, so...let's get the party started!

Change PayPalSubscrition.aspx.cs on v6.1.3

You are not authorized to post a reply.
Sort:


New Member


Posts:2
New Member

    I've made the change to this file to remove the currency symbols in pricing related PayPal parameters. Now I need to deploy that change. 

    The file I changed specifically is \admin\Sales\PayPalSubscription.aspx.cs.

    The PayPalSubscription.ascx denotes this as a CodeBehind not CodeFile:

    <%@ Page language="vb" AutoEventWireup="false" Explicit="True" Inherits="Incite.Modules.MetalQuick.PayPalSubscription" CodeBehind="PayPalSubscription.aspx.cs" %>

    1. So it looks like I have to build the full solution?
    2. I don't suppose just changing the CodeBehind to CodeFile verbiage will help as the file is already compiled into the .dll?
    3. I have the source for a 6.2.3 version, but it is huge...any tips on what I need to build specifically?

    Thanks in advance!

     



    Veteran Member


    Posts:860
    Veteran Member

      Is this for a module? Can you provide a reference?

      The file that you seem to be looking at it part of the DNN Platform. It's not recommended that you modify core files.

      If you are looking to remove a symbol, it might be best to do this with CSS. But, to tell you more, I'd need to know what you are looking at?
      Joe Craig
      DNN MVP
      Patapsco Research Group


      New Member


      Posts:2
      New Member

        Yes, I was referring to a core DNN module that no longer works with PayPal. Specifically the problem is the code currently uses these variables to pass as the subscription amounts, and they include currency symbols, which no longer is allowed per paypal. As such, I had to add the .Replace("$", String.Empty) to remove the currency symbol (well actually I guess I should just remove the enFormat formatting in case I have non-US signups...but anyway...

        Dim strService As String = String.Format(enFormat.NumberFormat, "{0:#####0.00}", objRole.ServiceFee).Replace("$", String.Empty)
        Dim strTrial As String = String.Format(enFormat.NumberFormat, "{0:#####0.00}", objRole.TrialFee).Replace("$", String.Empty)

        And the amount in the URL is being set to the strService string, which includes the currency symbol

        strPayPalURL += "&a1=" & HTTPPOSTEncode(strTrial)
        strPayPalURL += "&a3=" & HTTPPOSTEncode(strService)

        But I found that I did change the DNN core file to wire up to my own copy of the file that is in my custom module. Which I do have the ability to rebuild and deploy to our DNN 6.1.3 site:

        <%@ Page language="vb" AutoEventWireup="false" Explicit="True" Inherits="MyCompany.Modules.MyModule.PayPalSubscription" CodeBehind="PayPalSubscription.aspx.vb" %>

        Which I did, and am all set now. This was a very old custom module that I haven't worked on in years, so I had to find my way around again :)



        Veteran Member


        Posts:860
        Veteran Member

          Great!
          Joe Craig
          DNN MVP
          Patapsco Research Group
          You are not authorized to post a reply.

          These Forums are dedicated to discussion of DNN Platform.

          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.

          Would you like to help us?

          Awesome! Simply post in the forums using the link below and we'll get you started.

          Get Involved