Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70237

Payment modal breaks if there is html in a gateway description

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Note: You do not need any valid credentials for either payment gateways, or accounts

      1. Log in to Moodle as admin
      2. Visit "Site administration > Plugins > Payment gateways > Manage payment gateways" and enable the PayPal gateway
      3. Create a Payment account via "Site administration > Payments > Payment accounts". Make sure to select the 'Enable' checkbox.
      4. Click on the 'PayPal' link associated with the payment account you just created and configure the settings. Fill the settings with dummy values. Make sure to select the 'Enable' checkbox.
      5. Visit "Site administration > Plugins > Enrolments > Manage enrol plugins" and enable the "Enrolment on payment" plugin
      6. Go to a course and then go to 'Enrolment methods' via the gear menu or the Administration block
      7. Add Enrolment on payment as an enrolment method and set "Enrol cost" to $10
      8. Go to  "Site administration > Language > Language customisation" and edit 
      9. Proceed with editing the English language pack and load strings of the "paygw_paypal.php" component
      10. Customise the string for the "gatewaydescription" to the following

        <a href="https://www.paypal.com/">PayPal</a> is an authorised payment gateway provider for processing credit card transactions.

      11. Save changes to the language pack
      12. Log in as a user and attempt to enrol yourself in the course
      13. Click on the "Select payment type" button
      14. Verify that the gateway selection modal is loaded with no error
      Show
      Note: You do not need any valid credentials for either payment gateways, or accounts Log in to Moodle as admin Visit "Site administration > Plugins > Payment gateways > Manage payment gateways" and enable the PayPal gateway Create a Payment account via "Site administration > Payments > Payment accounts". Make sure to select the 'Enable' checkbox. Click on the 'PayPal' link associated with the payment account you just created and configure the settings. Fill the settings with dummy values. Make sure to select the 'Enable' checkbox. Visit "Site administration > Plugins > Enrolments > Manage enrol plugins" and enable the "Enrolment on payment" plugin Go to a course and then go to 'Enrolment methods' via the gear menu or the Administration block Add Enrolment on payment as an enrolment method and set "Enrol cost" to $10 Go to  "Site administration > Language > Language customisation" and edit  Proceed with editing the English language pack and load strings of the "paygw_paypal.php" component Customise the string for the "gatewaydescription" to the following < a href = "https://www.paypal.com/" >PayPal</ a > is an authorised payment gateway provider for processing credit card transactions. Save changes to the language pack Log in as a user and attempt to enrol yourself in the course Click on the "Select payment type" button Verify that the gateway selection modal is loaded with no error
    • Affected Branches:
      MOODLE_310_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull from Repository:
    • Pull 3.10 Branch:
      MDL-70237-310
    • Pull 3.11 Branch:
      MDL-70237-311
    • Pull Master Branch:
      MDL-70237-master

      Description

      It is common for language translators to sometimes include HTML tags in language packs. The payment modal currently breaks if there is an HTML tag in the gateway's description (for example a link to the gateway's website).

        Attachments

          Activity

            People

            Assignee:
            rezaie9 Shamim Rezaie
            Reporter:
            rezaie9 Shamim Rezaie
            Peer reviewer:
            Peter Dias
            Integrator:
            Andrew Nicols
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Jan/21

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 5 minutes
                2h 5m