Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_payment\local\callback\service_provider Interface Reference

The service_provider interface for plugins to provide callbacks which are needed by the payment subsystem. More...

Inheritance diagram for core_payment\local\callback\service_provider:
enrol_fee\payment\service_provider

Static Public Member Functions

static deliver_order (string $paymentarea, int $itemid, int $paymentid, int $userid)
 Callback function that delivers what the user paid for to them.
 
static get_payable (string $paymentarea, int $itemid)
 Callback function that returns the cost of the given item in the specified payment area, along with the accountid that payments are paid to.
 
static get_success_url (string $paymentarea, int $itemid)
 Callback function that returns the URL of the page the user should be redirected to in the case of a successful payment.
 

Detailed Description

The service_provider interface for plugins to provide callbacks which are needed by the payment subsystem.

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

Member Function Documentation

◆ deliver_order()

static core_payment\local\callback\service_provider::deliver_order ( string $paymentarea,
int $itemid,
int $paymentid,
int $userid )
static

Callback function that delivers what the user paid for to them.

Parameters
string$paymentareaPayment area
int$itemidAn identifier that is known to the plugin
int$paymentidpayment id as inserted into the 'payments' table, if needed for reference
int$useridThe userid the order is going to deliver to
Return values
boolWhether successful or not

Implemented in enrol_fee\payment\service_provider.

◆ get_payable()

static core_payment\local\callback\service_provider::get_payable ( string $paymentarea,
int $itemid )
static

Callback function that returns the cost of the given item in the specified payment area, along with the accountid that payments are paid to.

Parameters
string$paymentareaPayment area
int$itemidAn identifier that is known to the plugin
Return values
core_payment\local\entities\payable

Implemented in enrol_fee\payment\service_provider.

◆ get_success_url()

static core_payment\local\callback\service_provider::get_success_url ( string $paymentarea,
int $itemid )
static

Callback function that returns the URL of the page the user should be redirected to in the case of a successful payment.

Parameters
string$paymentareaPayment area
int$itemidAn identifier that is known to the plugin
Return values
moodle_url

Implemented in enrol_fee\payment\service_provider.


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