Documentation

WC_Gateway_InSite_Redsys extends WC_Payment_Gateway

Gateway class

Table of Contents

Properties

$notify_url  : mixed

Methods

__construct()  : void
Constructor for the gateway.
add_error_to_checkout()  : mixed
Add error to checkout
add_insite_redsys2()  : mixed
Add the InSite JS to the checkout page.
add_subscription_supports()  : array<string|int, mixed>
Add gateway to support subscriptions.
admin_options()  : mixed
Admin Panel Options
ask_for_refund()  : bool
Ask for refund
check_confirm_cres()  : mixed
Check for InSite CRES
check_confirm_pares()  : mixed
Check for PaRes
check_ipn_request_is_valid()  : mixed
Check redsys IPN validity
check_ipn_response()  : mixed
Check for Servired/RedSys HTTP Notification
check_redsys_refund()  : mixed
Check if the pingback is valid
check_token_insite_from_action_checkout()  : mixed
Check for valid token & prepare payment form.
check_user_show_payment_method()  : mixed
Check if user is in test mode
check_user_test_mode()  : mixed
Check if user is in test mode
doing_scheduled_subscription_payment()  : mixed
Charge a WooCommerce subscription.
get_insite_order()  : mixed
Get insite order
get_js_header()  : mixed
Get JS Header
get_redsys_sha256()  : string
Get SHA256.
get_redsys_url_gateway()  : mixed
Get Redsys URL Gateway
get_redsys_url_gateway_ws()  : mixed
Get Redsys URL Gateway WS
hide_payment_method_add_method()  : mixed
Check if user is in test mode
hide_payment_method_by_country()  : mixed
Hide payment method by country.
init_form_fields()  : void
Initialise Gateway Settings Form Fields
is_valid_for_use()  : bool
Check if this gateway is enabled and available in the user's country
move_terms_and_conditions()  : mixed
Move terms and conditions checkbox to the bottom of the checkout form.
pay_with_token_c()  : array<string|int, mixed>
Process the payment and return the result.
pay_with_token_r()  : array<string|int, mixed>
Process the payment and return the result
payment_fields()  : mixed
Add payment fields on checkout page.
process_payment()  : mixed
Process the payment and return the result
process_refund()  : mixed
Process a refund if supported
receipt_page()  : void
Receipt_page function.
renew_sumo_subscription()  : bool
Renew SUMO Subscriptions
renew_yith_subscription()  : mixed
Process Yith subscription
save_field_update_order_meta()  : mixed
Save field update order meta.
show_payment_method()  : mixed
Check if user is in test mode
successful_request()  : mixed
Successful Payment.
update_checkout_on_change()  : mixed
Update checkout on change.

Properties

Methods

add_subscription_supports()

Add gateway to support subscriptions.

public static add_subscription_supports(array<string|int, mixed> $subscription_gateways) : array<string|int, mixed>
Parameters
$subscription_gateways : array<string|int, mixed>
Return values
array<string|int, mixed>

ask_for_refund()

Ask for refund

public ask_for_refund(int $order_id, string $transaction_id, float $amount) : bool
Parameters
$order_id : int

Order ID.

$transaction_id : string

Transaction ID.

$amount : float

Amount.

Return values
bool

check_confirm_cres()

Check for InSite CRES

public check_confirm_cres(array<string|int, mixed> $post) : mixed
Parameters
$post : array<string|int, mixed>

$_POST data.

check_confirm_pares()

Check for PaRes

public check_confirm_pares(array<string|int, mixed> $post) : mixed
Parameters
$post : array<string|int, mixed>

$_POST data.

check_redsys_refund()

Check if the pingback is valid

public check_redsys_refund(string $order_id) : mixed
Parameters
$order_id : string

Order ID.

check_token_insite_from_action_checkout()

Check for valid token & prepare payment form.

public static check_token_insite_from_action_checkout() : mixed

check_user_show_payment_method()

Check if user is in test mode

public check_user_show_payment_method([int $userid = false ]) : mixed
Parameters
$userid : int = false

User ID.

check_user_test_mode()

Check if user is in test mode

public check_user_test_mode([int $userid = false ]) : mixed
Parameters
$userid : int = false

User ID.

doing_scheduled_subscription_payment()

Charge a WooCommerce subscription.

public doing_scheduled_subscription_payment(float $amount_to_charge, WC_Order $renewal_order) : mixed
Parameters
$amount_to_charge : float

Amount to charge.

$renewal_order : WC_Order

Order.

get_js_header()

Get JS Header

public get_js_header([int $user_id = false ]) : mixed
Parameters
$user_id : int = false

User ID.

get_redsys_sha256()

Get SHA256.

public get_redsys_sha256([bool $user_id = false ]) : string
Parameters
$user_id : bool = false

User ID.

Return values
string

get_redsys_url_gateway()

Get Redsys URL Gateway

public get_redsys_url_gateway([int $user_id = false ]) : mixed
Parameters
$user_id : int = false

User ID.

get_redsys_url_gateway_ws()

Get Redsys URL Gateway WS

public get_redsys_url_gateway_ws([int $user_id = false ]) : mixed
Parameters
$user_id : int = false

User ID.

hide_payment_method_add_method()

Check if user is in test mode

public hide_payment_method_add_method(array<string|int, mixed> $available_gateways) : mixed
Parameters
$available_gateways : array<string|int, mixed>

Available Gateways.

hide_payment_method_by_country()

Hide payment method by country.

public hide_payment_method_by_country(array<string|int, mixed> $available_gateways) : mixed
Parameters
$available_gateways : array<string|int, mixed>

Available gateways.

is_valid_for_use()

Check if this gateway is enabled and available in the user's country

public is_valid_for_use() : bool
Return values
bool

move_terms_and_conditions()

Move terms and conditions checkbox to the bottom of the checkout form.

public move_terms_and_conditions() : mixed

pay_with_token_c()

Process the payment and return the result.

public pay_with_token_c(int $order_id, string $token_id) : array<string|int, mixed>
Parameters
$order_id : int

Order ID.

$token_id : string

Token ID.

Return values
array<string|int, mixed>

pay_with_token_r()

Process the payment and return the result

public pay_with_token_r(int $order_id, string $token_id) : array<string|int, mixed>
Parameters
$order_id : int

Order ID.

$token_id : string

Token ID.

Return values
array<string|int, mixed>

process_payment()

Process the payment and return the result

public process_payment(int $order_id) : mixed
Parameters
$order_id : int

Order ID.

process_refund()

Process a refund if supported

public process_refund(int $order_id[, float $amount = null ][, string $reason = '' ]) : mixed
Parameters
$order_id : int

Order ID.

$amount : float = null

Refund amount.

$reason : string = ''

Refund reason.

renew_sumo_subscription()

Renew SUMO Subscriptions

public renew_sumo_subscription(bool $bool, int $subscription_id, obj $renewal_order[, bool $retry = false ]) : bool
Parameters
$bool : bool

True or false.

$subscription_id : int

Subscription ID.

$renewal_order : obj

Renewal Order.

$retry : bool = false

True or false.

Return values
bool

renew_yith_subscription()

Process Yith subscription

public renew_yith_subscription([WC_Order $renewal_order = null ][, bool $is_manual_renew = null ]) : mixed
Parameters
$renewal_order : WC_Order = null

Order object.

$is_manual_renew : bool = null

Is manual renew.

save_field_update_order_meta()

Save field update order meta.

public save_field_update_order_meta(int $order_id) : mixed
Parameters
$order_id : int

Order ID.

show_payment_method()

Check if user is in test mode

public show_payment_method(array<string|int, mixed> $available_gateways) : mixed
Parameters
$available_gateways : array<string|int, mixed>

Available Gateways.

successful_request()

Successful Payment.

public successful_request(array<string|int, mixed> $posted) : mixed
Parameters
$posted : array<string|int, mixed>

Post data after processing.

update_checkout_on_change()

Update checkout on change.

public update_checkout_on_change(array<string|int, mixed> $fields) : mixed
Parameters
$fields : array<string|int, mixed>

Fields.


        
On this page

Search results