diff --git a/payment/classes/external/get_available_gateways.php b/payment/classes/external/get_available_gateways.php
index b8a1abf0f66..b926a3fe73f 100644
--- a/payment/classes/external/get_available_gateways.php
+++ b/payment/classes/external/get_available_gateways.php
@@ -96,7 +96,7 @@ class get_available_gateways extends external_api {
new external_single_structure([
'shortname' => new external_value(PARAM_PLUGIN, 'Name of the plugin'),
'name' => new external_value(PARAM_TEXT, 'Human readable name of the gateway'),
- 'description' => new external_value(PARAM_TEXT, 'description of the gateway'),
+ 'description' => new external_value(PARAM_RAW, 'description of the gateway'),
'surcharge' => new external_value(PARAM_INT, 'percentage of surcharge when using the gateway'),
'cost' => new external_value(PARAM_TEXT,
'Cost in human-readable form (amount plus surcharge with currency sign)'),
diff --git a/payment/gateway/paypal/db/install.php b/payment/gateway/paypal/db/install.php
index f9ca2d6eb8f..59db98939b4 100644
--- a/payment/gateway/paypal/db/install.php
+++ b/payment/gateway/paypal/db/install.php
@@ -23,6 +23,8 @@
*/
function xmldb_paygw_paypal_install() {
+ global $CFG;
+
// Enable the Paypal payment gateway on installation. It still needs to be configured and enabled for accounts.
$order = (!empty($CFG->paygw_plugins_sortorder)) ? explode(',', $CFG->paygw_plugins_sortorder) : [];
set_config('paygw_plugins_sortorder', join(',', array_merge($order, ['paypal'])));
diff --git a/payment/templates/gateway.mustache b/payment/templates/gateway.mustache
index 4189f9ffef0..fed351fd5ae 100644
--- a/payment/templates/gateway.mustache
+++ b/payment/templates/gateway.mustache
@@ -45,7 +45,7 @@
\ No newline at end of file