PaymentGatewaysController
in package
PaymentGateway class
Table of Contents
- extend_response() : WP_REST_Response
- Add necessary fields to REST API response.
- get_post_install_scripts() : array<string|int, mixed>
- Get payment gateway scripts for post-install.
- handle_successfull_connection() : mixed
- Handle a successful gateway connection.
- init() : mixed
- Initialize payment gateway changes.
- possibly_do_connection_return_action() : mixed
- Call an action after a gating has been successfully returned.
Methods
extend_response()
Add necessary fields to REST API response.
public
static extend_response(WP_REST_Response $response, WC_Payment_Gateway $gateway, WP_REST_Request $request) : WP_REST_Response
Parameters
- $response : WP_REST_Response
-
Response data.
- $gateway : WC_Payment_Gateway
-
Payment gateway object.
- $request : WP_REST_Request
-
Request object.
Return values
WP_REST_Response —get_post_install_scripts()
Get payment gateway scripts for post-install.
public
static get_post_install_scripts(WC_Payment_Gateway $gateway) : array<string|int, mixed>
Parameters
- $gateway : WC_Payment_Gateway
-
Payment gateway object.
Return values
array<string|int, mixed> — Install scripts.handle_successfull_connection()
Handle a successful gateway connection.
public
static handle_successfull_connection(string $gateway_id) : mixed
Parameters
- $gateway_id : string
-
Gateway ID.
Return values
mixed —init()
Initialize payment gateway changes.
public
static init() : mixed
Return values
mixed —possibly_do_connection_return_action()
Call an action after a gating has been successfully returned.
public
static possibly_do_connection_return_action() : mixed