ClientOperation

Used as a wrapper for API requests to Stripe.

Allows method chaining so things like mode can be set intuitively.

Tags
since
4.0.0
author

PaymentPlugins

Table of Contents

Properties

$client  : StripeClient
$messages  : array<string|int, mixed>
$mode  : string
$property  : string
$secret_key  : string
$service  : AbstractService

Methods

__call()  : mixed
Wrapper for Stripe API operations.
__construct()  : mixed
get_wp_error()  : WP_Error
has_property()  : mixed
mode()  : $this
add_expanded_properties()  : array<string|int, mixed>
get_api_options()  : array<string|int, mixed>
get_error_message()  : string
parse_args()  : array<string|int, mixed>
prepare_request_args()  : array<string|int, mixed>
Prevents any unwanted arguments from being added to a Stripe request.
sanitize_intent_params()  : array<string|int, mixed>

Properties

Methods

__call()

Wrapper for Stripe API operations.

public __call(string $method, array<string|int, mixed> $args) : mixed

This way, all exceptions can be caught gracefully.

Parameters
$method : string
$args : array<string|int, mixed>
Tags
throws
InvalidArgumentException

__construct()

public __construct(StripeClient $client, string $property[, string $secret_key = '' ][, string $mode = '' ]) : mixed
Parameters
$client : StripeClient
$property : string
$secret_key : string = ''
$mode : string = ''
Tags
throws
InvalidArgumentException

get_wp_error()

public get_wp_error(ApiErrorException $e[, string $code = 'stripe-error' ]) : WP_Error
Parameters
$e : ApiErrorException
$code : string = 'stripe-error'
Tags
since
4.0.0
Return values
WP_Error

add_expanded_properties()

private add_expanded_properties(array<string|int, mixed> $params, array<string|int, mixed> $properties) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
$properties : array<string|int, mixed>
Return values
array<string|int, mixed>

parse_args()

private parse_args(array<string|int, mixed> $args, string $method) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>
$method : string
Return values
array<string|int, mixed>

prepare_request_args()

Prevents any unwanted arguments from being added to a Stripe request.

private prepare_request_args(array<string|int, mixed> $args, string $method) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>
$method : string
Tags
since
4.0.0
Return values
array<string|int, mixed>

sanitize_intent_params()

private sanitize_intent_params(array<string|int, mixed> $params, string $method) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
$method : string
Return values
array<string|int, mixed>

        
On this page

Search results