WC_Stripe_Controller_Payment_Method
extends WC_Stripe_Rest_Controller
in package
Tags
Table of Contents
Properties
- $error : WP_Error
- $namespace : mixed
Methods
- admin_permission_check() : mixed
- payment_method_from_token() : WP_Error|WP_REST_Response|mixed
- Creates a PaymentMethod from a Token.
- register_routes() : mixed
- Register all routes that the controller uses.
- rest_uri() : mixed
- rest_url() : mixed
- add_validation_error() : mixed
- Allows a status code of 200 to be returned even if there is a validation error.
- get_error_messages() : mixed
- get_messages() : mixed
- register_authenticated_route() : mixed
Properties
$error
protected
WP_Error
$error
= \null
$namespace
protected
mixed
$namespace
= 'payment-method'
Methods
admin_permission_check()
public
admin_permission_check(WP_REST_Request $request) : mixed
Parameters
- $request : WP_REST_Request
payment_method_from_token()
Creates a PaymentMethod from a Token.
public
payment_method_from_token(WP_REST_Request $request) : WP_Error|WP_REST_Response|mixed
Use case for this controller would be if a token is provided on the client side, but PaymentIntent is desired instead of a Charge. The token must be converted to a PaymentMethod for use in a PaymentIntent.
Parameters
- $request : WP_REST_Request
Return values
WP_Error|WP_REST_Response|mixedregister_routes()
Register all routes that the controller uses.
public
register_routes() : mixed
rest_uri()
public
rest_uri([mixed $uri = '' ]) : mixed
Parameters
- $uri : mixed = ''
rest_url()
public
rest_url([mixed $uri = '' ]) : mixed
Parameters
- $uri : mixed = ''
add_validation_error()
Allows a status code of 200 to be returned even if there is a validation error.
protected
add_validation_error(WP_Error $error) : mixed
Parameters
- $error : WP_Error
get_error_messages()
protected
get_error_messages() : mixed
get_messages()
protected
get_messages([mixed $types = 'all' ]) : mixed
Parameters
- $types : mixed = 'all'
register_authenticated_route()
protected
register_authenticated_route(string $route) : mixed
Parameters
- $route : string