LLMS_Payment_Gateway
LifterLMS Payment Gateways abstract class
Description Description
Source Source
File: includes/abstracts/abstract.llms.payment.gateway.php
Changelog Changelog
Version | Description |
---|---|
4.0.0 | Removed deprecated completed transaction message parameter output. |
3.37.18 | Allow redirection to external domains by disabling "safe" redirects. |
3.34.3 | During order completion, use llms_redirect_and_exit() instead of wp_redirect() and exit() . |
3.30.0 | Added access plan and query string checkout redirect settings. |
3.0.0 | Introduced. |
Methods Methods
- complete_transaction — This should be called by the gateway after verifying the transaction was completed successfully
- confirm_pending_order — Confirm a Payment Called by LLMS_Controller_Orders->confirm_pending_order() on confirm form submission Some validation is performed before passing to this function, as it's not required gateways will likely doing further validations as are needed
- get_admin_description — Get admin description for the gateway
- get_admin_order_fields — Get data about the fields displayed on the admin panel when viewing an order processed via this gateway
- get_admin_settings_fields — Get default gateway admin settings fields
- get_admin_title — Get the admin title for the gateway
- get_api_mode — Get API mode if test is not supported will return "live"
- get_complete_transaction_redirect_url — Calculates the url to redirect to on transaction completion
- get_customer_url — Gateways can override this to return a URL to a customer permalink on the gateway's website If this is not defined, it will just return the supplied ID
- get_description — Get the frontend description setting
- get_display_order — Get the display order setting
- get_enabled — Get the value of the enabled setting
- get_fields — Get fields displayed on the checkout form Gateways should define this function if the gateway supports fields
- get_icon — Get the icon displayed on the checkout form
- get_id — Get the gateway's ID
- get_item_link — Retrieve an HTML link to a customer, subscription, or source URL If no URL provided returns the item value as string
- get_logging_enabled — Get the value of the logging setting
- get_option — Get the value of an option from the database & fallback to default value if none found Optionally attempts to retrieve a secure key first, if secure key is provided.
- get_option_name — Retrieve an option name specific to the gateway Used to retrieve options from the wp_options table where applicable
- get_source_url — Gateways can override this to return a URL to a source permalink on the gateway's website If this is not defined, it will just return the supplied ID
- get_subscription_url — Gateways can override this to return a URL to a subscription permalink on the gateway's website If this is not defined, it will just return the supplied ID
- get_supported_features — Get an array of features the gateway supports
- get_test_mode_description — Get the description of test mode displayed on the admin panel
- get_test_mode_enabled — Get value of the test mode enabled setting
- get_test_mode_title — Get the title of test mode displayed on the admin panel
- get_title — Get gateway title setting
- get_transaction_url — Gateways can override this to return a URL to a transaction permalink on the gateway's website If this is not defined, it will just return the supplied ID
- handle_payment_source_switch — Called when the Update Payment Method form is submitted from a single order view on the student dashboard
- handle_pending_order — Handle a Pending Order Called by LLMS_Controller_Orders->create_pending_order() on checkout form submission All data will be validated before it's passed to this function
- handle_recurring_transaction — Called by scheduled actions to charge an order for a scheduled recurring transaction This function must be defined by gateways which support recurring transactions
- is_default_gateway — Determine if the gateway is the default gateway This will be the FIRST gateway in the gateways that are enabled
- is_enabled — Determine if the gateway is enabled according to admin settings checkbox
- is_test_mode_enabled — Determine if test mode is enabled Returns false if gateway doesn't support test mode
- log — Log messages if logging is enabled
- process_refund — Called when refunding via a Gateway This function must be defined by gateways which support refunds This function is called by LLMS_Transaction->process_refund()
- supports — Determine if a feature is supported by the gateway Looks at the $this->supports and ensures the submitted feature exists and is true