WC_Gateway_Bizum_Checkout_Redsys
extends WC_Payment_Gateway
in package
WC_Gateway_Bizum_Checkout_Redsys Class.
Table of Contents
Properties
- $butonbgcolor : string
- The background color for the button.
- $butontextcolor : string
- The text color for the button.
- $buttoncheckout : string
- The button text for checkout.
- $checkbizum : string
- The live URL for checking Bizum.
- $checkbizumpay : string
- The live URL for checking Bizum payments.
- $checkbizumtesturl : string
- The test URL for checking Bizum.
- $checkbizumtesturlpay : string
- The test URL for checking Bizum payments.
- $commercename : string
- The commerce name for the gateway.
- $customer : string
- The customer name for the gateway.
- $customtestsha256 : string
- The custom test SHA256 for testing purposes.
- $debug : bool
- Indicates if debug mode is enabled.
- $descripredsys : string
- The description for the gateway.
- $description : string
- The description of the gateway.
- $enabled : bool
- Indicates if the gateway is enabled.
- $has_fields : bool
- Indicates if the gateway has fields on the checkout form.
- $hideownsetting : bool
- Indicates if own settings are hidden.
- $id : string
- The ID of the gateway.
- $liveurl : string
- The live URL for making payments.
- $liveurlws : string
- The live URL for the web service.
- $log : string
- The log for the gateway.
- $method_description : string
- The description of the gateway.
- $method_title : string
- The title of the gateway.
- $multisitesttings : bool
- Indicates if multisite settings are used.
- $not_use_https : bool
- Indicates if HTTPS is not used.
- $notify_url : string
- The notify URL for the gateway.
- $notify_url_not_https : string
- The notify URL for the gateway without HTTPS.
- $ownsetting : bool
- Indicates if own settings are used.
- $redsyslanguage : string
- The language for the gateway.
- $secretsha256 : string
- The secret SHA256 for the gateway.
- $supports : array<string|int, mixed>
- The supported features for the gateway.
- $terminal : string
- The terminal for the gateway.
- $testforuser : bool
- Indicates if the gateway is for testing a specific user.
- $testforuserid : int
- The user ID for testing a specific user.
- $testmode : string
- The test mode for the gateway.
- $testsha256 : string
- The test SHA256 for testing purposes.
- $testshowgateway : bool
- Indicates if the gateway should be shown in the test mode.
- $testurl : string
- The test URL for making payments.
- $testurlws : string
- The test URL for the web service.
- $title : string
- The title of the gateway.
- $transactionlimit : string
- The transaction limit for the gateway.
Methods
- __construct() : void
- Constructor for the gateway.
- admin_options() : mixed
- Admin Panel Options
- ask_for_refund() : bool|WP_Error
- Ask for Refund
- bizum_payment_rest() : mixed
- Check the Bizum phone nunmer.
- check_bizum_payment() : mixed
- Check for Bizum HTTP Notification
- check_bizum_phone() : mixed
- Check the Bizum phone nunmer.
- check_ipn_request_is_valid() : mixed
- Check redsys IPN validity
- check_ipn_response() : mixed
- Check for Bizum HTTP Notification
- check_redsys_refund() : bool
- Check if the ping is from Redsys
- check_user_show_payment_method() : mixed
- Check if user is in test mode
- check_user_test_mode() : bool
- Check if this gateway is enabled in test mode for a user
- custom_jquery_checkout() : mixed
- Add custom jQuery to checkout page.
- disable_bizum() : bool
- Check if this gateway is enabled by price
- generate_redsys_form() : string
- Generate the redsys form
- get_redsys_args() : array<string|int, mixed>
- Get redsys Args for passing to PP
- get_redsys_sha256() : string
- Get the SHA256 key based on the user and test mode.
- get_redsys_url_gateway() : string
- Get redsys URL
- init_form_fields() : void
- Initialise Gateway Settings Form Fields
- is_valid_for_use() : bool
- Check if this gateway is enabled and available with the current currency.
- payment_fields() : mixed
- Payment_fields function.
- process_payment() : array<string|int, mixed>
- Process the payment and return the result
- process_refund() : bool
- Process a refund if supported.
- receipt_page() : mixed
- Output for the order received page.
- save_field_update_order_meta() : mixed
- Save fields to checkout (Bizum).
- show_payment_method() : mixed
- Check if show gateway.
- successful_request() : mixed
- Successful Payment.
- verificar_estado_pago_ajax() : mixed
- Verificar estado pago AJAX.
- warning_checkout_test_mode_bizum() : mixed
- Warning when Bizum is in test mode.
Properties
$butonbgcolor
The background color for the button.
public
string
$butonbgcolor
$butontextcolor
The text color for the button.
public
string
$butontextcolor
$buttoncheckout
The button text for checkout.
public
string
$buttoncheckout
$checkbizum
The live URL for checking Bizum.
public
string
$checkbizum
$checkbizumpay
The live URL for checking Bizum payments.
public
string
$checkbizumpay
$checkbizumtesturl
The test URL for checking Bizum.
public
string
$checkbizumtesturl
$checkbizumtesturlpay
The test URL for checking Bizum payments.
public
string
$checkbizumtesturlpay
$commercename
The commerce name for the gateway.
public
string
$commercename
$customer
The customer name for the gateway.
public
string
$customer
$customtestsha256
The custom test SHA256 for testing purposes.
public
string
$customtestsha256
$debug
Indicates if debug mode is enabled.
public
bool
$debug
$descripredsys
The description for the gateway.
public
string
$descripredsys
$description
The description of the gateway.
public
string
$description
$enabled
Indicates if the gateway is enabled.
public
bool
$enabled
$has_fields
Indicates if the gateway has fields on the checkout form.
public
bool
$has_fields
$hideownsetting
Indicates if own settings are hidden.
public
bool
$hideownsetting
$id
The ID of the gateway.
public
string
$id
$liveurl
The live URL for making payments.
public
string
$liveurl
$liveurlws
The live URL for the web service.
public
string
$liveurlws
$log
The log for the gateway.
public
string
$log
$method_description
The description of the gateway.
public
string
$method_description
$method_title
The title of the gateway.
public
string
$method_title
$multisitesttings
Indicates if multisite settings are used.
public
bool
$multisitesttings
$not_use_https
Indicates if HTTPS is not used.
public
bool
$not_use_https
$notify_url
The notify URL for the gateway.
public
string
$notify_url
$notify_url_not_https
The notify URL for the gateway without HTTPS.
public
string
$notify_url_not_https
$ownsetting
Indicates if own settings are used.
public
bool
$ownsetting
$redsyslanguage
The language for the gateway.
public
string
$redsyslanguage
$secretsha256
The secret SHA256 for the gateway.
public
string
$secretsha256
$supports
The supported features for the gateway.
public
array<string|int, mixed>
$supports
$terminal
The terminal for the gateway.
public
string
$terminal
$testforuser
Indicates if the gateway is for testing a specific user.
public
bool
$testforuser
$testforuserid
The user ID for testing a specific user.
public
int
$testforuserid
$testmode
The test mode for the gateway.
public
string
$testmode
$testsha256
The test SHA256 for testing purposes.
public
string
$testsha256
$testshowgateway
Indicates if the gateway should be shown in the test mode.
public
bool
$testshowgateway
$testurl
The test URL for making payments.
public
string
$testurl
$testurlws
The test URL for the web service.
public
string
$testurlws
$title
The title of the gateway.
public
string
$title
$transactionlimit
The transaction limit for the gateway.
public
string
$transactionlimit
Methods
__construct()
Constructor for the gateway.
public
__construct() : void
admin_options()
Admin Panel Options
public
admin_options() : mixed
Tags
ask_for_refund()
Ask for Refund
public
ask_for_refund(int $order_id, string $transaction_id, float $amount) : bool|WP_Error
Parameters
- $order_id : int
-
Order ID.
- $transaction_id : string
-
Transaction ID.
- $amount : float
-
Amount.
Return values
bool|WP_Errorbizum_payment_rest()
Check the Bizum phone nunmer.
public
bizum_payment_rest(object $order, string $phone) : mixed
Parameters
- $order : object
-
Order object.
- $phone : string
-
Phone number.
check_bizum_payment()
Check for Bizum HTTP Notification
public
check_bizum_payment(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
check_bizum_phone()
Check the Bizum phone nunmer.
public
check_bizum_phone(object $order, string $phone) : mixed
Parameters
- $order : object
-
Order object.
- $phone : string
-
Phone number.
check_ipn_request_is_valid()
Check redsys IPN validity
public
check_ipn_request_is_valid() : mixed
check_ipn_response()
Check for Bizum HTTP Notification
public
check_ipn_response() : mixed
check_redsys_refund()
Check if the ping is from Redsys
public
check_redsys_refund(int $order_id) : bool
Parameters
- $order_id : int
-
Order ID.
Return values
boolcheck_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 this gateway is enabled in test mode for a user
public
check_user_test_mode(int $userid) : bool
Parameters
- $userid : int
-
User ID.
Return values
boolcustom_jquery_checkout()
Add custom jQuery to checkout page.
public
custom_jquery_checkout() : mixed
disable_bizum()
Check if this gateway is enabled by price
public
disable_bizum(array<string|int, mixed> $available_gateways) : bool
Parameters
- $available_gateways : array<string|int, mixed>
-
Available gateways.
Return values
boolgenerate_redsys_form()
Generate the redsys form
public
generate_redsys_form(mixed $order_id) : string
Parameters
- $order_id : mixed
-
Order ID.
Return values
stringget_redsys_args()
Get redsys Args for passing to PP
public
get_redsys_args(WC_Order $order) : array<string|int, mixed>
Parameters
- $order : WC_Order
-
Order object.
Return values
array<string|int, mixed>get_redsys_sha256()
Get the SHA256 key based on the user and test mode.
public
get_redsys_sha256(int $user_id) : string
Parameters
- $user_id : int
-
User ID.
Return values
string —The SHA256 key.
get_redsys_url_gateway()
Get redsys URL
public
get_redsys_url_gateway(int $user_id[, bool $type = 'rd' ]) : string
Parameters
- $user_id : int
-
User ID.
- $type : bool = 'rd'
-
Type.
Return values
stringinit_form_fields()
Initialise Gateway Settings Form Fields
public
init_form_fields() : void
is_valid_for_use()
Check if this gateway is enabled and available with the current currency.
public
is_valid_for_use() : bool
Return values
boolpayment_fields()
Payment_fields function.
public
payment_fields() : mixed
process_payment()
Process the payment and return the result
public
process_payment(int $order_id) : array<string|int, mixed>
Parameters
- $order_id : int
-
Order ID.
Return values
array<string|int, mixed>process_refund()
Process a refund if supported.
public
process_refund(int $order_id[, float $amount = null ][, string $reason = '' ]) : bool
Parameters
- $order_id : int
-
Order ID.
- $amount : float = null
-
Refund amount.
- $reason : string = ''
-
Refund reason.
Return values
bool —True or false based on success, or a WP_Error object.
receipt_page()
Output for the order received page.
public
receipt_page(obj $order) : mixed
Parameters
- $order : obj
-
Order object.
save_field_update_order_meta()
Save fields to checkout (Bizum).
public
save_field_update_order_meta(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
show_payment_method()
Check if show gateway.
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 notify.
verificar_estado_pago_ajax()
Verificar estado pago AJAX.
public
static verificar_estado_pago_ajax() : mixed
warning_checkout_test_mode_bizum()
Warning when Bizum is in test mode.
public
warning_checkout_test_mode_bizum() : mixed