A payment gateway is a technology used by merchants to accept debit or credit card purchases from customers.
In Moodle 3.10 onwards, payment gateways are used with Enrolment on payment to provide different payment options when purchasing access to a course.
Payment gateways are a plugin type with the PayPal payment gateway included as standard. Additional payment gateways such as Alipay and WeChat are available from the Moodle plugins directory:Plugin type: Payment gateways.
Payment gateway set-up
- Go to Site administration / Plugins / Payment gateways and enable payment gateways as required.
- Click the settings link for each payment gateway to set a surcharge i.e. an additional percentage charged to users who choose to pay using this payment gateway, then save changes.
Payment account set-up
- Go to Site administration / Plugins / Payment gateways and click the link 'Payment accounts'.
- Click the button 'Create payment account' then enter an account name for identifying it when setting up enrolment on payment, then save changes.
- On the Payment accounts page, click the payment gateway link e.g. PayPal opposite the account name.
- Enter a client ID and secret from PayPal, tick the Enable box and save changes.
The payment gateway will then show as enabled for the account.
Multiple payment accounts may be set-up as required.
When done, the payment gateway and payment accounts are ready to be used with Enrolment on payment.