PaymentsApi
in package
Table of Contents
Properties
- $payment_result : PaymentResult
- $assets_registry : mixed
- $config : mixed
- $container : mixed
- $payment_method_registry : PaymentMethodRegistry
- $payment_methods : mixed
Methods
- __construct() : mixed
- enqueue_cart_data() : mixed
- enqueue_checkout_data() : mixed
- enqueue_editor_styles() : mixed
- enqueue_payment_styles() : mixed
- get_payment_methods() : array<string|int, AbstractStripePayment>
- payment_with_context() : mixed
- process_payment_error() : mixed
- register_payment_methods() : mixed
- Register all payment methods used by the plugin.
- transform_payment_method_type() : mixed
- Blocks only recognize payment tokens of type 'cc' therefore it's necessary to map the 'stripe_cc' list entry to 'cc'.
- add_payment_method_to_registry() : mixed
- add_payment_methods() : mixed
- add_to_cc_list() : mixed
- Helper function to add an item to the cc list, initializing if needed
- enqueue_data() : mixed
- initialize() : mixed
Properties
$payment_result
protected
PaymentResult
$payment_result
$assets_registry
private
mixed
$assets_registry
$config
private
mixed
$config
$container
private
mixed
$container
$payment_method_registry
private
PaymentMethodRegistry
$payment_method_registry
$payment_methods
private
mixed
$payment_methods
= []
Methods
__construct()
public
__construct(Container $container, Config $config, AssetDataRegistry $assets_registry) : mixed
Parameters
- $container : Container
- $config : Config
- $assets_registry : AssetDataRegistry
enqueue_cart_data()
public
enqueue_cart_data() : mixed
enqueue_checkout_data()
public
enqueue_checkout_data() : mixed
enqueue_editor_styles()
public
enqueue_editor_styles() : mixed
enqueue_payment_styles()
public
enqueue_payment_styles(Api $style_api) : mixed
Parameters
- $style_api : Api
get_payment_methods()
public
get_payment_methods() : array<string|int, AbstractStripePayment>
Return values
array<string|int, AbstractStripePayment>payment_with_context()
public
payment_with_context(PaymentContext $context, PaymentResult $result) : mixed
Parameters
- $context : PaymentContext
- $result : PaymentResult
process_payment_error()
public
process_payment_error(WP_Error $error) : mixed
Parameters
- $error : WP_Error
-
|null
register_payment_methods()
Register all payment methods used by the plugin.
public
register_payment_methods(PaymentMethodRegistry $registry) : mixed
Parameters
- $registry : PaymentMethodRegistry
transform_payment_method_type()
Blocks only recognize payment tokens of type 'cc' therefore it's necessary to map the 'stripe_cc' list entry to 'cc'.
public
transform_payment_method_type(mixed $list) : mixed
Parameters
- $list : mixed
add_payment_method_to_registry()
private
add_payment_method_to_registry(mixed $clazz, PaymentMethodRegistry $registry) : mixed
Parameters
- $clazz : mixed
- $registry : PaymentMethodRegistry
add_payment_methods()
private
add_payment_methods() : mixed
add_to_cc_list()
Helper function to add an item to the cc list, initializing if needed
private
add_to_cc_list(mixed &$list, mixed $item) : mixed
Parameters
- $list : mixed
- $item : mixed
Tags
enqueue_data()
private
enqueue_data(mixed $page) : mixed
Parameters
- $page : mixed
initialize()
private
initialize() : mixed