WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe uses WC_Stripe_Payment_Intent_Trait, WC_Stripe_Express_Payment_Trait

Tags
since
3.0.0
author

PaymentPlugins

Table of Contents

Properties

$gateway  : WC_Stripe_Gateway
$has_parent_gateway  : mixed
$is_voucher_payment  : bool
$last_payment_error  : WP_Error
$payment_intent_key  : string
$payment_method_token  : string
$payment_object  : WC_Stripe_Payment
$payment_token_object  : WC_Payment_Token_Stripe
$payment_type_key  : string
$processing_payment  : bool
$save_source_key  : string
$saved_method_key  : string
$synchronous  : bool
Is the payment method synchronous or asynchronous
$template_name  : string
$token_key  : string
$checkout_error  : bool
$has_digital_wallet  : bool
$new_payment_method_label  : mixed
$new_source_token  : string
$payment_method_type  : mixed
$post_payment_processes  : array<string|int, mixed>
$request_context  : RequestContext
$saved_payment_methods_label  : mixed
$setup_intent  : SetupIntent
$supports_save_payment_method  : mixed
$tab_title  : mixed
$token_type  : string
Used to create an instance of a WC_Payment_Token
$wp_error  : WP_Error
$admin_output  : mixed

Methods

__construct()  : mixed
add_payment_method()  : mixed
{@inheritDoc}
add_stripe_order_args()  : mixed
Gateways can override this method to add attributes to the Stripe object before it's sent to Stripe.
add_to_cart_response()  : mixed
Decorate the response with data specific to the gateway.
admin_nav_tab()  : mixed
admin_options()  : mixed
banner_checkout_enabled()  : bool
Return true if checkout page banner is enabled for this gateway
capture_charge()  : mixed
Captures the charge for the Stripe order.
cart_checkout_enabled()  : bool
Return true if cart page checkout is enabled for this gateway
cart_fields()  : mixed
create_customer()  : mixed
Create a customer in the stripe gateway.
create_payment_method()  : WC_Payment_Token_Stripe|WP_Error
Creates a payment method in Stripe.
delete_payment_method()  : mixed
display_errors()  : mixed
Display admin error messages.
enqueue_add_payment_method_scripts()  : mixed
Enqueue scripts needed by the gateway on the add payment method page.
enqueue_admin_scripts()  : mixed
enqueue_cart_scripts()  : mixed
Enqueue scripts needed by the gateway on the cart page.
enqueue_checkout_scripts()  : mixed
Enqueue scripts needed by the gateway on the checkout page.
enqueue_frontend_scripts()  : mixed
Enqueue scripts needed by the gateway on the frontend of the WC shop.
enqueue_mini_cart_scripts()  : mixed
enqueue_payment_method_styles()  : void
enqueue_product_scripts()  : mixed
Enqueue scripts needed by the gateway on the product page.
generate_button_demo_html()  : mixed
generate_description_html()  : mixed
generate_multi_select_countries_html()  : mixed
generate_multiselect_html()  : mixed
generate_paragraph_html()  : mixed
generate_stripe_button_html()  : mixed
get_complete_payment_return_url()  : mixed
get_confirmation_method()  : mixed
get_custom_attribute_html()  : mixed
get_display_items()  : mixed
Returns a formatted array of items for display in the payment gateway's payment sheet.
get_display_items_for_cart()  : array<string|int, mixed>
get_element_options()  : mixed
get_formatted_shipping_method()  : array<string|int, mixed>
get_formatted_shipping_methods()  : array<string|int, mixed>
get_generic_error()  : mixed
get_localized_params()  : array<string|int, mixed>
get_method_formats()  : mixed
get_mini_cart_dependencies()  : array<string|int, mixed>
get_needs_shipping()  : bool
Return true if shipping is needed.
get_new_method_label()  : mixed
get_new_source_id()  : mixed
get_new_source_token()  : mixed
get_order_description()  : mixed
get_order_error()  : array<string|int, mixed>
Return a failed order response.
get_order_meta_data()  : mixed
Given a meta key, see if there is a value for that key in another plugin.
get_order_status_option()  : mixed
get_payment_button_locale()  : mixed|void
get_payment_element_options()  : mixed
get_payment_intent_checkout_url()  : mixed
get_payment_intent_confirmation_args()  : mixed
get_payment_intent_id()  : mixed
get_payment_method_charge_type()  : mixed
get_payment_method_formats()  : mixed
get_payment_method_from_charge()  : mixed
Given a charge object, return the ID of the payment method used for the charge.
get_payment_method_from_request()  : mixed
Returns the payment method the customer wants to use.
get_payment_method_type()  : mixed
get_payment_object()  : mixed
get_payment_source()  : mixed
Return the payment source the customer has chosen to use.
get_payment_token()  : mixed
get_payment_token_type()  : string
get_prefix()  : mixed
get_request_context()  : RequestContext
get_save_payment_method_label()  : string
get_saved_methods_label()  : mixed
get_saved_source_id()  : mixed
get_setup_intent()  : mixed
get_setup_intent_checkout_params()  : mixed
get_shipping_method_label()  : mixed
Return a formatted shipping method label.
get_shipping_methods()  : array<string|int, mixed>
Returns a formatted array of shipping methods for display in the payment gateway's payment sheet.
get_shipping_packages()  : array<string|int, mixed>
get_stripe_documentation_url()  : mixed
get_supported_button_locales()  : mixed|void
get_token()  : null|WC_Payment_Token_Stripe_CC
get_transaction_url()  : mixed
get_update_shipping_address_response()  : mixed
Decorate the update shipping address respond with data.
get_update_shipping_method_response()  : mixed
Decorate the update shipping method reponse with data.
handle_setup_intent_for_order()  : array<string|int, mixed>|void
has_enqueued_scripts()  : bool
has_order_lock()  : mixed
Returns true of the order has been locked.
hooks()  : mixed
init_form_fields()  : mixed
init_supports()  : mixed
is_active()  : mixed
is_change_payment_method_request()  : bool
Return true if this request is to change the payment method of a WC Subscription.
is_deferred_intent_creation()  : false
is_installment_available()  : mixed
is_mandate_required()  : mixed
mini_cart_enabled()  : bool
Return true if mini-cart checkout is enabled for this gateway
mini_cart_fields()  : mixed
output_display_items()  : mixed
Outputs fields required by Google Pay to render the payment wallet.
output_settings_nav()  : mixed
payment_fields()  : mixed
payment_methods_list_item()  : mixed
process_admin_options()  : mixed
Added override to provide more control on which fields are saved and which are skipped.
process_payment()  : mixed
{@inheritDoc}
process_pre_order()  : mixed
process_pre_order_payment()  : mixed
process_refund()  : mixed
{@inheritDoc}
process_server_side_confirmation()  : mixed
process_subscription_payment_method_updated()  : array<string|int, mixed>|array<string|int, string>
process_zero_total_order()  : array<string|int, mixed>|void
product_checkout_enabled()  : bool
Return true if product page checkout is enabled for this gateway
product_fields()  : mixed
Output the product payment fields.
release_order_lock()  : mixed
Removes the lock on the order
retrieve_charge()  : WP_Error|Charge
Return the \Stripe\Charge object
save_order_meta()  : mixed
Save the Stripe data to the order.
save_payment_method()  : WP_Error|bool
Save the customer's payment method.
save_zero_total_meta()  : mixed
saved_payment_methods()  : mixed
scheduled_subscription_payment()  : mixed
set_new_source_token()  : mixed
set_order_lock()  : mixed
Sets a lock on the order.
set_payment_method_token()  : mixed
Sets the ID of a payment token.
set_payment_save_error()  : mixed
Set an error on the order.
set_post_payment_process()  : mixed
set_request_context()  : mixed
set_setup_intent()  : mixed
should_save_payment_method()  : bool
Return true of the payment method should be saved.
show_save_payment_method_html()  : bool|mixed|void|null
show_save_source()  : bool
Returns true if the save payment method checkbox can be displayed.
subscription_payment_meta()  : mixed
trigger_post_payment_processes()  : mixed
update_failing_payment_method()  : mixed
use_saved_source()  : mixed
Return true of the customer is using a saved payment method.
validate_multi_select_countries_field()  : mixed
validate_payment_sections_field()  : mixed
void_charge()  : mixed
Void the Stripe charge.
add_payment_intent_mandate_args()  : mixed
get_display_item_for_cart()  : array<string|int, mixed>
get_display_item_for_order()  : mixed
get_display_item_for_product()  : array<string|int, mixed>
get_display_items_for_order()  : array<string|int, mixed>
get_element_options_locale()  : mixed|null
get_formatted_shipping_label()  : string|void
get_payment_intent_checkout_params()  : array<string|int, mixed>
get_shipping_method_id()  : mixed
is_processing_scheduled_payment()  : bool
Returns true if a scheduled subscription payment is being processed.
order_contains_pre_order()  : mixed
Pre orders can't be mixed with regular products.
pre_order_requires_tokenization()  : bool
process_change_payment_method_request()  : array<string|int, mixed>
requires_confirmation_mandate()  : mixed
does_order_require_action()  : array<string|int, mixed>

Properties

Methods

add_stripe_order_args()

Gateways can override this method to add attributes to the Stripe object before it's sent to Stripe.

public add_stripe_order_args(array<string|int, mixed> &$args, WC_Order $order[, mixed $intent = null ]) : mixed
Parameters
$args : array<string|int, mixed>
$order : WC_Order
$intent : mixed = null

get_display_items()

Returns a formatted array of items for display in the payment gateway's payment sheet.

public get_display_items([stirng $page = 'checkout' ][, mixed $order = null ]) : mixed
Parameters
$page : stirng = 'checkout'
$order : mixed = null
Tags
@return

[]

get_display_items_for_cart()

public get_display_items_for_cart(WC_Cart $cart[, array<string|int, mixed> $items = array() ]) : array<string|int, mixed>
Parameters
$cart : WC_Cart
$items : array<string|int, mixed> = array()
Tags
since
3.2.1
Return values
array<string|int, mixed>

get_formatted_shipping_method()

public get_formatted_shipping_method(mixed $price, mixed $rate, mixed $i, mixed $package, mixed $incl_tax) : array<string|int, mixed>
Parameters
$price : mixed
$rate : mixed
$i : mixed
$package : mixed
$incl_tax : mixed
Return values
array<string|int, mixed>

get_order_meta_data()

Given a meta key, see if there is a value for that key in another plugin.

public get_order_meta_data(string $meta_key, WC_Order $order[, string $context = 'view' ]) : mixed

This acts as a lazy conversion method for merchants that have switched to our plugin from other plugins.

Parameters
$meta_key : string
$order : WC_Order
$context : string = 'view'
Tags
since
3.1.0

get_payment_intent_checkout_url()

public get_payment_intent_checkout_url(PaymentIntent $intent, WC_Order $order[, mixed $type = 'payment_intent' ]) : mixed
Parameters
$intent : PaymentIntent
$order : WC_Order
$type : mixed = 'payment_intent'

get_payment_intent_confirmation_args()

public get_payment_intent_confirmation_args(PaymentIntent $intent, WC_Order $order) : mixed
Parameters
$intent : PaymentIntent
$order : WC_Order

handle_setup_intent_for_order()

public handle_setup_intent_for_order(WC_Order $order) : array<string|int, mixed>|void
Parameters
$order : WC_Order
Return values
array<string|int, mixed>|void

output_display_items()

Outputs fields required by Google Pay to render the payment wallet.

public output_display_items([string $page = 'checkout' ][, array<string|int, mixed> $data = array() ]) : mixed
Parameters
$page : string = 'checkout'
$data : array<string|int, mixed> = array()

process_admin_options()

Added override to provide more control on which fields are saved and which are skipped.

public process_admin_options() : mixed

This plugin has custom setting fields like "paragraph" that are for info display only and not for saving.

Tags
see
WC_Settings_API::process_admin_options()

process_refund()

{@inheritDoc}

public process_refund(mixed $order_id[, mixed $amount = null ][, mixed $reason = '' ]) : mixed
Parameters
$order_id : mixed
$amount : mixed = null
$reason : mixed = ''
Tags
see
WC_Payment_Gateway::process_refund()

process_subscription_payment_method_updated()

public process_subscription_payment_method_updated(WC_Subscription $subscription) : array<string|int, mixed>|array<string|int, string>
Parameters
$subscription : WC_Subscription
Return values
array<string|int, mixed>|array<string|int, string>

process_zero_total_order()

public process_zero_total_order(WC_Order $order) : array<string|int, mixed>|void
Parameters
$order : WC_Order
Return values
array<string|int, mixed>|void

save_payment_method()

Save the customer's payment method.

public save_payment_method(string $id, WC_Order $order[, mixed $payment_details = null ]) : WP_Error|bool

If the payment method has already been saved to the customer then simply return true.

Parameters
$id : string
$order : WC_Order
$payment_details : mixed = null
Return values
WP_Error|bool

set_payment_save_error()

Set an error on the order.

public set_payment_save_error(WC_Order $order, WP_Error $error) : mixed

This error is used on the frontend to alert customer's to a failed payment method save.

Parameters
$order : WC_Order
$error : WP_Error

subscription_payment_meta()

public subscription_payment_meta(array<string|int, mixed> $payment_meta, WC_Subscription $subscription) : mixed
Parameters
$payment_meta : array<string|int, mixed>
$subscription : WC_Subscription

get_display_item_for_cart()

protected get_display_item_for_cart(mixed $price, mixed $label, mixed $type, mixed ...$args) : array<string|int, mixed>
Parameters
$price : mixed
$label : mixed
$type : mixed
$args : mixed
Return values
array<string|int, mixed>

get_display_items_for_order()

protected get_display_items_for_order(WC_Order $order[, array<string|int, mixed> $items = array() ]) : array<string|int, mixed>
Parameters
$order : WC_Order
$items : array<string|int, mixed> = array()
Tags
since
3.2.1
Return values
array<string|int, mixed>

get_payment_intent_checkout_params()

protected get_payment_intent_checkout_params(mixed $intent, WC_Order $order, mixed $type) : array<string|int, mixed>
Parameters
$intent : mixed
$order : WC_Order
$type : mixed
Return values
array<string|int, mixed>

process_change_payment_method_request()

protected process_change_payment_method_request(WC_Subscription $subscription) : array<string|int, mixed>
Parameters
$subscription : WC_Subscription
Tags
since
3.2.13
Return values
array<string|int, mixed>

does_order_require_action()

private does_order_require_action(WC_Order $order, string $payment_method) : array<string|int, mixed>
Parameters
$order : WC_Order
$payment_method : string
Return values
array<string|int, mixed>

        
On this page

Search results