Class WC_Payment_Gateway_Stripe
- WC_Payment_Gateway
-
WC_Payment_Gateway_Stripe uses WC_Stripe_Settings_Trait
Direct known subclasses
WC_Payment_Gateway_Stripe_ACH
,
WC_Payment_Gateway_Stripe_ApplePay
,
WC_Payment_Gateway_Stripe_CC
,
WC_Payment_Gateway_Stripe_GooglePay
,
WC_Payment_Gateway_Stripe_Local_Payment
,
WC_Payment_Gateway_Stripe_Payment_Request
Indirect known subclasses
WC_Payment_Gateway_Stripe_Afterpay
,
WC_Payment_Gateway_Stripe_Alipay
,
WC_Payment_Gateway_Stripe_Klarna
,
WC_Payment_Gateway_Stripe_Multibanco
,
WC_Payment_Gateway_Stripe_OXXO
,
WC_Payment_Gateway_Stripe_P24
,
WC_Payment_Gateway_Stripe_Sepa
,
WC_Payment_Gateway_Stripe_Sofort
,
WC_Payment_Gateway_Stripe_WeChat
,
WC_Payment_Gateway_Stripe_Bancontact
,
WC_Payment_Gateway_Stripe_BECS
,
WC_Payment_Gateway_Stripe_Boleto
,
WC_Payment_Gateway_Stripe_EPS
,
WC_Payment_Gateway_Stripe_FPX
,
WC_Payment_Gateway_Stripe_Giropay
,
WC_Payment_Gateway_Stripe_GrabPay
,
WC_Payment_Gateway_Stripe_Ideal
Package: Stripe\Abstract
Author: PaymentPlugins
Since: 3.0.0
Located at abstract/abstract-wc-payment-gateway-stripe.php
Methods summary
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
enqueue_frontend_scripts(
Enqueue scripts needed by the gateway on the frontend of the WC shop. |
public
|
#
enqueue_checkout_scripts(
Enqueue scripts needed by the gateway on the checkout page. |
public
|
#
enqueue_add_payment_method_scripts(
Enqueue scripts needed by the gateway on the add payment method page. |
public
|
#
enqueue_cart_scripts(
Enqueue scripts needed by the gateway on the cart page. |
public
|
#
enqueue_product_scripts(
Enqueue scripts needed by the gateway on the product page. |
public
|
|
public
|
|
public
array
|
|
public
|
|
public
|
#
get_payment_method_from_charge( Stripe\Charge $charge )
Given a charge object, return the ID of the payment method used for the charge. |
public
|
|
public
|
|
public
|
|
public
|
|
public
WP_Error|Stripe\Charge
|
|
public
|
|
public
array
|
|
public
|
#
get_payment_source( )
Return the payment source the customer has chosen to use. This can be a saved source or a one time use source. |
public
|
#
get_payment_method_from_request( )
Returns the payment method the customer wants to use. This can be a saved payment method or a new payment method. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
#
get_needs_shipping( )
Return true if shipping is needed. Shipping is based on things like if the cart or product needs shipping. |
public
boolean
|
|
public
boolean
|
|
public
[]
|
#
get_display_items( stirng $page = 'checkout', $order = null )
Returns a formatted array of items for display in the payment gateway's payment sheet. |
public
array
|
#
get_shipping_methods( boolean $encode,… )
Returns a formatted array of shipping methods for display in the payment gateway's payment sheet. |
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
public
|
#
get_update_shipping_method_response( [] $data )
Decorate the update shipping method reponse with data. |
public
|
#
get_update_shipping_address_response( [] $data )
Decorate the update shipping address respond with data. |
public
WP_Error|boolean
|
#
save_payment_method( string $id, WC_Order $order, $payment_details = null )
Save the customer's payment method. If the payment method has already been saved to the customer then simply return true. |
public
|
#
set_payment_save_error( WC_Order $order, WP_Error $error )
Set an error on the order. This error is used on the frontend to alert customer's to a failed payment method save. |
public
null|
|
|
public
|
|
public
|
|
public
boolean
|
#
is_change_payment_method_request( )
Return true if this request is to change the payment method of a WC Subscription. |
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
protected
|
|
protected
boolean
|
|
public
|
#
set_order_lock( WC_Order|integer $order )
Sets a lock on the order. Default behavior is a 2 minute lock. |
public
|
|
public
|
#
has_order_lock( WC_Order|integer $order )
Returns true of the order has been locked. If the lock exists and is greater than current time method returns true; |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
get_order_meta_data( string $meta_key, WC_Order $order, string $context = 'view' )
Given a meta key, see if there is a value for that key in another plugin. This acts as a lazy conversion method for merchants that have switched to our plugin from other plugins. |
public
|
#
add_stripe_order_args( array & $args, WC_Order $order )
Gateways can override this method to add attributes to the Stripe object before it's sent to Stripe. |
public
|
|
private
|
|
public
|
#
output_display_items( string $page = 'checkout', array $data = array() )
Outputs fields required by Google Pay to render the payment wallet. |
public
|
|
public
array
|
|
protected
array
|
|
protected
array
|
|
protected
array
|
|
protected
|
#
get_display_item_for_order( float $price, string $label, WC_Order $order, string $type, mixed $args )
|
protected
array
|
|
public
array
|
|
public
array
|
#
get_formatted_shipping_method( float $price, WC_Shipping_Rate $rate, string $i, array $package, boolean $incl_tax )
|
protected
mixed
|
|
protected
|
|
protected
boolean
|
#
is_processing_scheduled_payment( )
Returns true if a scheduled subscription payment is being processed. |
public
boolean
|
|
public
|
|
protected
array
|
|
public
|
|
public
mixed|
|
Methods used from WC_Stripe_Settings_Trait
admin_nav_tab()
,
admin_options()
,
display_errors()
,
generate_button_demo_html()
,
generate_description_html()
,
generate_multi_select_countries_html()
,
generate_multiselect_html()
,
generate_paragraph_html()
,
generate_stripe_button_html()
,
get_custom_attribute_html()
,
get_prefix()
,
get_stripe_documentation_url()
,
is_active()
,
output_settings_nav()
,
process_admin_options()
,
validate_multi_select_countries_field()
Properties summary
public
|
$payment_object
|
|
protected
boolean
|
$has_digital_wallet
|
#
false
|
public
string
|
$token_key
|
|
public
string
|
$saved_method_key
|
|
public
string
|
$payment_type_key
|
|
public
string
|
$payment_intent_key
|
|
public
string
|
$save_source_key
|
|
public
string
|
$template_name
|
|
protected
boolean
|
$checkout_error
|
#
false
|
protected
string
|
$token_type
Used to create an instance of a WC_Payment_Token |
|
protected
|
$gateway
|
|
protected
WP_Error
|
$wp_error
|
|
public
string
|
$payment_method_token
|
#
null
|
protected
string
|
$new_source_token
|
#
null
|
public
boolean
|
$synchronous
Is the payment method synchronous or asynchronous |
#
true
|
protected
array
|
$post_payment_processes
|
#
array()
|
public
boolean
|
$processing_payment
|
#
false
|
public
WP_Error
|
$last_payment_error
|