WC_Gateway_Redsys_Global
in package
Gateway class
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- add_subscription_note() : bool
- Add subscription note
- all_virtual_products() : mixed
- Check if the product needs preauth.
- allowed_currencies() : mixed
- Get allowed currencies
- cart_has_preauth() : bool
- Check if the card needs preauth.
- cart_has_token_r() : bool
- Check if the card needs tokenization.
- cart_needs_payment() : mixed
- Check if order needs payment.
- cart_use_block() : mixed
- Check if cart uses blocks.
- check_all_woo_subscription_checkout() : mixed
- Check if order needs subscription
- check_card_for_subscription() : mixed
- Check Card for Subscription.
- check_card_preauth() : mixed
- Check if card needs Preauth
- check_if_token_is_valid() : mixed
- Check if token is valid.
- check_order_has_pre_order() : mixed
- Check if order has pre order
- check_order_has_sumo_subscriptions() : mixed
- Check if order has SUMO subscriptions
- check_order_has_yith_subscriptions() : mixed
- Check if order has yith subscriptions
- check_order_is_paid_loop() : mixed
- Check if order is paid Loop.
- check_order_needs_token_r() : bool
- Check if an order needs a token
- check_product_for_subscription() : mixed
- Check if product needs token R.
- check_product_key() : bool
- Check if the product key is valid
- check_redsys_subscription_checkout() : mixed
- Check if order needs subscription
- check_simple_product_subscription() : mixed
- Check simple product subscription.
- check_soap() : bool
- Check SOAP.
- check_sumo_subscription_checkout() : mixed
- Check if order needs subscription
- check_token_error() : mixed
- What to do with token
- check_tokens_exist() : mixed
- Check tokens exist.
- check_type_exist_in_tokens() : mixed
- Check Token Type exist in tokens.
- check_woo_subscription_checkout() : mixed
- Check if order needs subscription
- check_yith_subscription_checkout() : mixed
- Check if order needs subscription
- checkout_use_block() : mixed
- Check if checkout uses blocks.
- clean_data() : string
- Clean data
- clean_order_number() : mixed
- Clean Order Number.
- collect_invoice_by_id() : mixed
- Collect invoice by ID.
- create_add_payment_method_number() : mixed
- Create add payment method number
- create_checkout_insite_number() : mixed
- Create checkout insite number
- debug() : mixed
- Debug function
- disable_gateways_preauth() : bool
- Disable gateways that don't support preauth.
- disable_gateways_token_r() : bool
- Disable gateways that don't support tokenization.
- do_make_3dmethod() : mixed
- Do the 3D Secure method
- get_all_tokens() : mixed
- Get all tokens by type.
- get_all_tokens_checkout() : mixed
- Get all tokens by type.
- get_canonical_product_id() : mixed
- Get canonical product id.
- get_card_brand() : mixed
- Get card brand.
- get_country_codes() : mixed
- Get country codes
- get_country_codes_2() : mixed
- Get country codes 2
- get_country_codes_3() : mixed
- Get country codes 3
- get_country_codes_phone() : mixed
- Get country codes
- get_currencies() : mixed
- Get currencies
- get_ds_error() : mixed
- Get DS Error
- get_ds_response() : mixed
- Get DS Response
- get_error() : mixed
- Get Redsys Error
- get_error_by_code() : mixed
- Get Error by code
- get_error_type() : mixed
- Get error type
- get_gateway() : mixed
- Get Gateway
- get_lang_code() : mixed
- Get lang code
- get_last_four() : string
- Get las 4 numbers of a card
- get_letters() : mixed
- Get Letters.
- get_letters_up() : mixed
- Get Letters Up.
- get_msg_error() : mixed
- Get msg error
- get_msg_error_by_code() : mixed
- Get msg Error by code
- get_option_from_main_site() : mixed
- Get option from main site
- get_order() : mixed
- Get Order
- get_order_auth() : mixed
- Get Order auth
- get_order_auth_refund() : mixed
- Get order auth refund.
- get_order_date() : mixed
- Get Order date
- get_order_edit_url() : mixed
- Get Order Edit URL
- get_order_hour() : mixed
- Get Order hour
- get_order_id_from_subscription() : mixed
- Get Parend Order ID from Subscriptin ID.
- get_order_item() : array<string|int, mixed>
- Get order item.
- get_order_meta() : mixed
- Get order meta.
- get_order_mumber() : mixed
- Get Order Number
- get_order_pay_gold_link() : mixed
- Get Order Paygold Link
- get_orders_number_type() : mixed
- Get Order types
- get_orders_type() : mixed
- Get Order types
- get_post_edit_url() : mixed
- Get Post Edit URL
- get_redsys_languages() : mixed
- Get Redsys languages
- get_redsys_option() : mixed
- Get option from main site
- get_redsys_order_number() : mixed
- Get Redsys Order Number
- get_redsys_ownsetting() : mixed
- Get Redsys Ownsetting
- get_redsys_token_r() : mixed
- Get Redsys token R
- get_redsys_users_token() : mixed
- Get Redsys Users Token.
- get_redsys_wp_languages() : mixed
- Get Redsys WP languages
- get_response_by_code() : mixed
- Get Response by code
- get_status_pending() : mixed
- Get status pending.
- get_the_ip() : string
- Get the IP.
- get_token_by_id() : mixed
- Get token by id.
- get_token_type() : mixed
- Get Token Type
- get_transient() : mixed
- Get transient.
- get_txnid() : mixed
- Get Txnid
- get_url_add_payment_method() : mixed
- Get url add payment method
- get_url_bizum_payment() : mixed
- Get url redsys payment
- get_url_redsys_payment() : mixed
- Get url redsys payment
- get_users_token_bulk() : mixed
- Get Users Token Bulk.
- get_wp_option() : mixed
- Get option from WordPress
- has_to_flush() : bool
- Check if we need to flush rewrite rules
- is_cancelled() : bool
- Check if order is cancelled.
- is_ds_error() : mixed
- Check if is DS Error
- is_ds_response() : mixed
- Check if is DS Response
- is_gateway_enabled() : mixed
- Check if Gateway is enabled.
- is_msg_error() : mixed
- Check if is msg error
- is_paid() : bool
- Check if order is paid.
- is_redsys_error() : mixed
- Check if is Redsys Error
- is_redsys_order() : mixed
- Check if order is redsys order
- log() : mixed
- Add log function.
- maybe_use_token() : mixed
- What to do with token
- need_preauth() : mixed
- Check if product needs preauth.
- need_token_r() : mixed
- Check if product needs token R.
- order_contains_subscription() : mixed
- Check if order contains subscription.
- order_exist() : mixed
- Check if order exist
- order_needs_payment() : mixed
- Check if order needs payment.
- order_needs_preauth() : mixed
- Check if order needs preauth
- post_exist() : mixed
- Check if post exist
- prepare_order_number() : mixed
- Prepare Order Number.
- print_overlay_image() : mixed
- Print overlay image.
- product_description() : string|null
- Obtiene una descripción del producto para utilizarla como descripción del pedido en Redsys.
- push() : mixed
- Push notifications
- redsys_amount_format() : mixed
- Redsys amount format
- remove_token() : mixed
- Remove token.
- return_help_notice() : mixed
- Return help notice
- send_admin_email() : mixed
- Send admin email
- send_customer_email() : mixed
- Send customer email
- send_paygold_link() : mixed
- Send paygold link.
- send_push() : mixed
- Send push notifications
- set_order_paygold_link() : mixed
- Set Order Paygold Link
- set_token_type() : mixed
- Set Token Type
- set_transient() : mixed
- Get transient.
- set_txnid() : mixed
- Set Txnid
- subscription_plugin_exist() : mixed
- Check Subscription plugin exist.
- update_order_meta() : void
- Update order meta.
- check_subscription() : mixed
- Check if product is subscription.
Properties
$debug
Debug
public
bool
$debug
= \false
$log
Debug
public
bool
$log
= \false
Methods
__construct()
Constructor
public
__construct() : mixed
add_subscription_note()
Add subscription note
public
add_subscription_note(string $text, int $order_id) : bool
Parameters
- $text : string
-
Text.
- $order_id : int
-
Order ID.
Return values
boolall_virtual_products()
Check if the product needs preauth.
public
all_virtual_products() : mixed
allowed_currencies()
Get allowed currencies
public
allowed_currencies() : mixed
cart_has_preauth()
Check if the card needs preauth.
public
cart_has_preauth() : bool
Return values
boolcart_has_token_r()
Check if the card needs tokenization.
public
cart_has_token_r() : bool
Return values
boolcart_needs_payment()
Check if order needs payment.
public
static cart_needs_payment(bool $needs_payment, WC_Cart $cart) : mixed
Parameters
- $needs_payment : bool
-
Whether the order needs payment.
- $cart : WC_Cart
-
Cart object.
cart_use_block()
Check if cart uses blocks.
public
cart_use_block() : mixed
check_all_woo_subscription_checkout()
Check if order needs subscription
public
check_all_woo_subscription_checkout(int $product_id) : mixed
Parameters
- $product_id : int
-
Order ID.
check_card_for_subscription()
Check Card for Subscription.
public
check_card_for_subscription(array<string|int, mixed> $the_card) : mixed
Parameters
- $the_card : array<string|int, mixed>
-
The Card.
check_card_preauth()
Check if card needs Preauth
public
check_card_preauth(array<string|int, mixed> $the_card) : mixed
Parameters
- $the_card : array<string|int, mixed>
-
The Card.
check_if_token_is_valid()
Check if token is valid.
public
check_if_token_is_valid(int $token_id) : mixed
Parameters
- $token_id : int
-
Token ID.
check_order_has_pre_order()
Check if order has pre order
public
check_order_has_pre_order(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
check_order_has_sumo_subscriptions()
Check if order has SUMO subscriptions
public
check_order_has_sumo_subscriptions(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
check_order_has_yith_subscriptions()
Check if order has yith subscriptions
public
check_order_has_yith_subscriptions(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
check_order_is_paid_loop()
Check if order is paid Loop.
public
check_order_is_paid_loop(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
check_order_needs_token_r()
Check if an order needs a token
public
check_order_needs_token_r(int $order_id) : bool
Parameters
- $order_id : int
-
Order ID.
Return values
boolcheck_product_for_subscription()
Check if product needs token R.
public
check_product_for_subscription(int $product_id) : mixed
Parameters
- $product_id : int
-
Product ID.
check_product_key()
Check if the product key is valid
public
check_product_key() : bool
Return values
boolcheck_redsys_subscription_checkout()
Check if order needs subscription
public
check_redsys_subscription_checkout(int $product_id) : mixed
Parameters
- $product_id : int
-
Order ID.
check_simple_product_subscription()
Check simple product subscription.
public
check_simple_product_subscription(int $product_id) : mixed
Parameters
- $product_id : int
-
Product ID.
check_soap()
Check SOAP.
public
check_soap([string $terminal_state = 'real' ]) : bool
Parameters
- $terminal_state : string = 'real'
-
Terminal state.
Return values
boolcheck_sumo_subscription_checkout()
Check if order needs subscription
public
check_sumo_subscription_checkout(int $product_id) : mixed
Parameters
- $product_id : int
-
Order ID.
check_token_error()
What to do with token
public
check_token_error([WC_Order $order = false ][, string $token_id = false ][, string $error_code = false ]) : mixed
Parameters
- $order : WC_Order = false
-
Order.
- $token_id : string = false
-
Token.
- $error_code : string = false
-
Error code.
Tags
check_tokens_exist()
Check tokens exist.
public
check_tokens_exist(int $user_id, string $type) : mixed
Parameters
- $user_id : int
-
User ID.
- $type : string
-
Type.
check_type_exist_in_tokens()
Check Token Type exist in tokens.
public
check_type_exist_in_tokens(array<string|int, mixed> $tokens, string $type) : mixed
Parameters
- $tokens : array<string|int, mixed>
-
Tokens.
- $type : string
-
Type.
check_woo_subscription_checkout()
Check if order needs subscription
public
check_woo_subscription_checkout(int $product_id) : mixed
Parameters
- $product_id : int
-
Order ID.
check_yith_subscription_checkout()
Check if order needs subscription
public
check_yith_subscription_checkout(int $product_id) : mixed
Parameters
- $product_id : int
-
Order ID.
checkout_use_block()
Check if checkout uses blocks.
public
checkout_use_block() : mixed
clean_data()
Clean data
public
clean_data(string $out) : string
Parameters
- $out : string
-
Data to clean.
Return values
stringclean_order_number()
Clean Order Number.
public
clean_order_number(string $ordernumber) : mixed
Parameters
- $ordernumber : string
-
Order Number.
collect_invoice_by_id()
Collect invoice by ID.
public
collect_invoice_by_id(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
create_add_payment_method_number()
Create add payment method number
public
create_add_payment_method_number() : mixed
create_checkout_insite_number()
Create checkout insite number
public
create_checkout_insite_number() : mixed
debug()
Debug function
public
debug(string $log) : mixed
Parameters
- $log : string
-
is the log message.
disable_gateways_preauth()
Disable gateways that don't support preauth.
public
disable_gateways_preauth(array<string|int, mixed> $available_gateways) : bool
Parameters
- $available_gateways : array<string|int, mixed>
-
Available gateways.
Return values
booldisable_gateways_token_r()
Disable gateways that don't support tokenization.
public
disable_gateways_token_r(array<string|int, mixed> $available_gateways) : bool
Parameters
- $available_gateways : array<string|int, mixed>
-
Available gateways.
Return values
booldo_make_3dmethod()
Do the 3D Secure method
public
do_make_3dmethod(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
get_all_tokens()
Get all tokens by type.
public
get_all_tokens(int $user_id, string $type) : mixed
Parameters
- $user_id : int
-
User ID.
- $type : string
-
Type.
get_all_tokens_checkout()
Get all tokens by type.
public
get_all_tokens_checkout(int $user_id, string $type) : mixed
Parameters
- $user_id : int
-
User ID.
- $type : string
-
Type.
get_canonical_product_id()
Get canonical product id.
public
get_canonical_product_id(WC_Product|WC_Order_Item $item_or_product) : mixed
Parameters
- $item_or_product : WC_Product|WC_Order_Item
-
Item or product.
get_card_brand()
Get card brand.
public
get_card_brand([string $dscardbrand = false ]) : mixed
Parameters
- $dscardbrand : string = false
-
Card brand.
get_country_codes()
Get country codes
public
get_country_codes() : mixed
get_country_codes_2()
Get country codes 2
public
get_country_codes_2(string $country_code_2) : mixed
Parameters
- $country_code_2 : string
-
Country Code 2.
get_country_codes_3()
Get country codes 3
public
get_country_codes_3(string $country_code_2) : mixed
Parameters
- $country_code_2 : string
-
Country code 2.
get_country_codes_phone()
Get country codes
public
get_country_codes_phone() : mixed
get_currencies()
Get currencies
public
get_currencies() : mixed
get_ds_error()
Get DS Error
public
get_ds_error() : mixed
get_ds_response()
Get DS Response
public
get_ds_response() : mixed
get_error()
Get Redsys Error
public
get_error([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
get_error_by_code()
Get Error by code
public
get_error_by_code([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
get_error_type()
Get error type
public
get_error_type([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
get_gateway()
Get Gateway
public
get_gateway(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_lang_code()
Get lang code
public
get_lang_code([string $lang = 'en' ]) : mixed
Parameters
- $lang : string = 'en'
-
Language.
get_last_four()
Get las 4 numbers of a card
public
get_last_four([string $number = false ][, string $number2 = false ]) : string
Parameters
- $number : string = false
-
Card number.
- $number2 : string = false
-
Card number 2.
Return values
stringget_letters()
Get Letters.
public
get_letters(string $length) : mixed
Parameters
- $length : string
-
Length.
get_letters_up()
Get Letters Up.
public
get_letters_up(string $length) : mixed
Parameters
- $length : string
-
Length.
get_msg_error()
Get msg error
public
get_msg_error() : mixed
get_msg_error_by_code()
Get msg Error by code
public
get_msg_error_by_code([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
get_option_from_main_site()
Get option from main site
public
get_option_from_main_site(string $gateway) : mixed
Parameters
- $gateway : string
-
Gateway.
get_order()
Get Order
public
get_order(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
get_order_auth()
Get Order auth
public
get_order_auth(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_order_auth_refund()
Get order auth refund.
public
get_order_auth_refund(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_order_date()
Get Order date
public
get_order_date(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_order_edit_url()
Get Order Edit URL
public
get_order_edit_url(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
get_order_hour()
Get Order hour
public
get_order_hour(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_order_id_from_subscription()
Get Parend Order ID from Subscriptin ID.
public
get_order_id_from_subscription(int $subscription_id) : mixed
Parameters
- $subscription_id : int
-
Subscription ID.
get_order_item()
Get order item.
public
get_order_item(int $item_id, WC_Order $order) : array<string|int, mixed>
Parameters
- $item_id : int
-
Item id.
- $order : WC_Order
-
Order.
Tags
Return values
array<string|int, mixed>get_order_meta()
Get order meta.
public
get_order_meta(int $order_id, string $key[, bool $single = true ][, string $context = false ]) : mixed
Parameters
- $order_id : int
-
Order ID.
- $key : string
-
Meta key.
- $single : bool = true
-
Single.
- $context : string = false
-
Context.
get_order_mumber()
Get Order Number
public
get_order_mumber(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_order_pay_gold_link()
Get Order Paygold Link
public
get_order_pay_gold_link(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
get_orders_number_type()
Get Order types
public
get_orders_number_type() : mixed
get_orders_type()
Get Order types
public
get_orders_type() : mixed
get_post_edit_url()
Get Post Edit URL
public
get_post_edit_url(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
get_redsys_languages()
Get Redsys languages
public
get_redsys_languages() : mixed
get_redsys_option()
Get option from main site
public
get_redsys_option(string $option, string $gateway) : mixed
Parameters
- $option : string
-
Option.
- $gateway : string
-
Gateway.
get_redsys_order_number()
Get Redsys Order Number
public
get_redsys_order_number(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
get_redsys_ownsetting()
Get Redsys Ownsetting
public
get_redsys_ownsetting(string $gateway) : mixed
Parameters
- $gateway : string
-
is the WooCommerce gateway name.
get_redsys_token_r()
Get Redsys token R
public
get_redsys_token_r(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
get_redsys_users_token()
Get Redsys Users Token.
public
get_redsys_users_token([string $type = false ][, array<string|int, mixed> $data = false ]) : mixed
Parameters
- $type : string = false
-
Type.
- $data : array<string|int, mixed> = false
-
Data.
get_redsys_wp_languages()
Get Redsys WP languages
public
get_redsys_wp_languages() : mixed
get_response_by_code()
Get Response by code
public
get_response_by_code([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
get_status_pending()
Get status pending.
public
get_status_pending() : mixed
get_the_ip()
Get the IP.
public
get_the_ip() : string
Return values
stringget_token_by_id()
Get token by id.
public
get_token_by_id(int $token_id) : mixed
Parameters
- $token_id : int
-
Token ID.
get_token_type()
Get Token Type
public
get_token_type(int $token_id) : mixed
Parameters
- $token_id : int
-
Token ID.
get_transient()
Get transient.
public
get_transient([string $order_id = false ]) : mixed
Parameters
- $order_id : string = false
-
Order ID.
get_txnid()
Get Txnid
public
get_txnid(int $token_id) : mixed
Parameters
- $token_id : int
-
Token ID.
get_url_add_payment_method()
Get url add payment method
public
get_url_add_payment_method(string $gateway, int $user_id, string $token_type) : mixed
Parameters
- $gateway : string
-
Gateway.
- $user_id : int
-
User ID.
- $token_type : string
-
Token type.
get_url_bizum_payment()
Get url redsys payment
public
get_url_bizum_payment(int $order_id, string $final_notify_url) : mixed
Parameters
- $order_id : int
-
Order ID.
- $final_notify_url : string
-
Final notify url.
get_url_redsys_payment()
Get url redsys payment
public
get_url_redsys_payment(int $order_id, string $final_notify_url) : mixed
Parameters
- $order_id : int
-
Order ID.
- $final_notify_url : string
-
Final notify url.
get_users_token_bulk()
Get Users Token Bulk.
public
get_users_token_bulk(string $user_id[, string $type = false ][, array<string|int, mixed> $data = false ]) : mixed
Parameters
- $user_id : string
-
User ID.
- $type : string = false
-
Type.
- $data : array<string|int, mixed> = false
-
Data.
get_wp_option()
Get option from WordPress
public
get_wp_option(string $option) : mixed
Parameters
- $option : string
-
Option.
has_to_flush()
Check if we need to flush rewrite rules
public
has_to_flush() : bool
Return values
boolis_cancelled()
Check if order is cancelled.
public
is_cancelled(int $order_id) : bool
Parameters
- $order_id : int
-
Order ID.
Return values
boolis_ds_error()
Check if is DS Error
public
is_ds_error([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
is_ds_response()
Check if is DS Response
public
is_ds_response([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
is_gateway_enabled()
Check if Gateway is enabled.
public
is_gateway_enabled(string $gateway) : mixed
Parameters
- $gateway : string
-
Gateway.
is_msg_error()
Check if is msg error
public
is_msg_error([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
is_paid()
Check if order is paid.
public
is_paid(int $order_id) : bool
Parameters
- $order_id : int
-
Order ID.
Return values
boolis_redsys_error()
Check if is Redsys Error
public
is_redsys_error([string $error_code = null ]) : mixed
Parameters
- $error_code : string = null
-
Error code.
is_redsys_order()
Check if order is redsys order
public
is_redsys_order(string $order_id[, string $type = null ]) : mixed
Parameters
- $order_id : string
-
Order ID.
- $type : string = null
-
Order type.
log()
Add log function.
public
log(string $handler, string $message[, string $level = 'info' ]) : mixed
Parameters
- $handler : string
-
is the log handler.
- $message : string
-
is the log message.
- $level : string = 'info'
-
is the log level.
Tags
maybe_use_token()
What to do with token
public
maybe_use_token(string $token_id) : mixed
Parameters
- $token_id : string
-
Token.
Tags
need_preauth()
Check if product needs preauth.
public
need_preauth(int $product_id) : mixed
Parameters
- $product_id : int
-
Product ID.
need_token_r()
Check if product needs token R.
public
need_token_r(int $product_id) : mixed
Parameters
- $product_id : int
-
Product ID.
order_contains_subscription()
Check if order contains subscription.
public
order_contains_subscription(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
order_exist()
Check if order exist
public
order_exist(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
order_needs_payment()
Check if order needs payment.
public
static order_needs_payment(bool $needs_payment, WC_Order $order, array<string|int, mixed> $valid_order_statuses) : mixed
Parameters
- $needs_payment : bool
-
Whether the order needs payment.
- $order : WC_Order
-
Order object.
- $valid_order_statuses : array<string|int, mixed>
-
Array of valid order statuses.
order_needs_preauth()
Check if order needs preauth
public
order_needs_preauth(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
post_exist()
Check if post exist
public
post_exist(string $order_id) : mixed
Parameters
- $order_id : string
-
Order ID.
prepare_order_number()
Prepare Order Number.
public
prepare_order_number(string $order_id[, string $gateway = false ]) : mixed
Parameters
- $order_id : string
-
Order ID.
- $gateway : string = false
-
Gateway.
print_overlay_image()
Print overlay image.
public
print_overlay_image() : mixed
product_description()
Obtiene una descripción del producto para utilizarla como descripción del pedido en Redsys.
public
product_description(WC_Order $order, string $gateway) : string|null
Parameters
- $order : WC_Order
-
Objeto que representa el pedido de WooCommerce.
- $gateway : string
-
Nombre de la pasarela de pago.
Return values
string|null —Cadena de texto con la descripción del producto, o null si el pedido no es de Redsys.
push()
Push notifications
public
push(string $message[, string $type = false ]) : mixed
Parameters
- $message : string
-
Message.
- $type : string = false
-
Type of notification.
redsys_amount_format()
Redsys amount format
public
redsys_amount_format(float $total) : mixed
Parameters
- $total : float
-
Order total.
remove_token()
Remove token.
public
remove_token(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
Data.
return_help_notice()
Return help notice
public
return_help_notice() : mixed
send_admin_email()
Send admin email
public
send_admin_email(int $order_id, string $subject, string $message, string $heading) : mixed
Parameters
- $order_id : int
-
Order ID.
- $subject : string
-
Email subject.
- $message : string
-
Email message.
- $heading : string
-
Email heading.
send_customer_email()
Send customer email
public
send_customer_email(int $order_id, string $subject, string $message, string $heading) : mixed
Parameters
- $order_id : int
-
Order ID.
- $subject : string
-
Email subject.
- $message : string
-
Email message.
- $heading : string
-
Email heading.
send_paygold_link()
Send paygold link.
public
send_paygold_link([int $post_id = false ][, array<string|int, mixed> $data = false ][, string $type = false ]) : mixed
Parameters
- $post_id : int = false
-
Post ID.
- $data : array<string|int, mixed> = false
-
Data.
- $type : string = false
-
Type.
send_push()
Send push notifications
public
send_push(string $type) : mixed
Parameters
- $type : string
-
Type of notification.
set_order_paygold_link()
Set Order Paygold Link
public
set_order_paygold_link(string $order_id, string $link) : mixed
Parameters
- $order_id : string
-
Order ID.
- $link : string
-
Link.
set_token_type()
Set Token Type
public
set_token_type(int $token_id, int $type) : mixed
Parameters
- $token_id : int
-
Token ID.
- $type : int
-
Type.
set_transient()
Get transient.
public
set_transient([array<string|int, mixed> $data = false ][, string $order_id = false ]) : mixed
Parameters
- $data : array<string|int, mixed> = false
-
Data.
- $order_id : string = false
-
Order ID.
set_txnid()
Set Txnid
public
set_txnid(int $token_id, int $redsys_txnid) : mixed
Parameters
- $token_id : int
-
Token ID.
- $redsys_txnid : int
-
Redsys Txnid.
subscription_plugin_exist()
Check Subscription plugin exist.
public
subscription_plugin_exist() : mixed
update_order_meta()
Update order meta.
public
update_order_meta(int $post_id, array<string|int, mixed> $meta_key_array[, string $meta_value = false ]) : void
Parameters
- $post_id : int
-
Post ID.
- $meta_key_array : array<string|int, mixed>
-
Meta keys array.
- $meta_value : string = false
-
Meta value.
check_subscription()
Check if product is subscription.
private
check_subscription(int $product_id) : mixed
Parameters
- $product_id : int
-
Product ID.