WC_Stripe_Controller_Payment_Method extends WC_Stripe_Rest_Controller

Tags
author

PaymentPlugins

since
3.0.0

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

Methods

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|mixed

        
On this page

Search results