DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Change PayPalSubscrition.aspx.cs on v6.1.3

Sort:
You are not authorized to post a reply.





New Around Here





    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





      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 Around Here





        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





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

          These Forums are dedicated to the 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. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. 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.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. 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