Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_payment\gateway Class Reference

Base class for payment gateways. More...

Inheritance diagram for core_payment\gateway:
paygw_paypal\gateway

Static Public Member Functions

static add_configuration_to_gateway_form (\core_payment\form\account_gateway $form)
 Configuration form for the gateway instance.
 
static get_supported_currencies ()
 Returns the list of currencies that the payment gateway supports.
 
static validate_gateway_form (\core_payment\form\account_gateway $form, stdClass $data, array $files, array &$errors)
 Validates the gateway configuration form.
 

Detailed Description

Base class for payment gateways.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_configuration_to_gateway_form()

static core_payment\gateway::add_configuration_to_gateway_form ( \core_payment\form\account_gateway $form)
staticabstract

Configuration form for the gateway instance.

Use $form->get_mform() to access the MoodleQuickForm instance

Parameters
core_payment\form\account_gateway$form

◆ get_supported_currencies()

static core_payment\gateway::get_supported_currencies ( )
staticabstract

Returns the list of currencies that the payment gateway supports.

Return values
string[]An array of the currency codes in the three-character ISO-4217 format

Reimplemented in paygw_paypal\gateway.

◆ validate_gateway_form()

static core_payment\gateway::validate_gateway_form ( \core_payment\form\account_gateway $form,
stdClass $data,
array $files,
array & $errors )
static

Validates the gateway configuration form.

Needs to be overridden to make sure the incomplete configuration can not be enabled.

Parameters
core_payment\form\account_gateway$form
stdClass$data
array$files
array$errorsform errors (passed by reference)

The documentation for this class was generated from the following file: