LLMS_Payment_Gateway::handle_payment_source_switch( LLMS_Order $order, array $form_data = array() )
Called when the Update Payment Method form is submitted from a single order view on the student dashboard
Description Description
Gateways should do whatever the gateway needs to do to validate the new payment method and save it to the order so that future payments on the order will use this new source.
This should be an abstract function but experience has taught me that no one will upgrade follow our instructions and they’ll end up with 500 errors and debug mode disabled and send me giant frustrated question marks.
Parameters Parameters
- $order
-
(LLMS_Order) (Required) Order object.
- $form_data
-
(array) (Optional) Additional data passed from the submitted form (EG $_POST).
Default value: array()
Return Return
(null)
Source Source
File: includes/abstracts/abstract.llms.payment.gateway.php
public function handle_payment_source_switch( $order, $form_data = array() ) { return llms_add_notice( sprintf( // Translatos: %s = the title of the payment gateway. esc_html__( 'The selected payment gateway "%s" does not support payment method switching.', 'lifterlms' ), $this->get_title() ), 'error' ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.10.0 | Introduced. |