WC_Gateway_Bizum_Redsys
extends WC_Payment_Gateway
in package
WC_Gateway_Bizum_Redsys Class.
Table of Contents
Properties
- $butonbgcolor : string
- Button background color.
- $butontextcolor : string
- Button text color.
- $buttoncheckout : string
- Button text at checkout.
- $commercename : string
- Commerce name.
- $customer : string
- Customer ID.
- $customtestsha256 : string
- Custom test SHA-256 key.
- $debug : bool
- Whether debugging is enabled.
- $descripredsys : string
- Description for Redsys.
- $description : string
- Description of the gateway.
- $enabled : bool
- Whether the gateway is enabled.
- $has_fields : bool
- Whether the gateway has fields.
- $hideownsetting : bool
- Whether to hide own settings.
- $icon : string
- Gateway icon URL.
- $id : string
- Gateway ID.
- $liveurl : string
- Live URL for payment.
- $liveurlws : string
- Live URL for web service.
- $log : WC_Logger
- Logger instance.
- $method_description : string
- Description of the payment method.
- $method_title : string
- Title of the payment method.
- $multisitesttings : bool
- Whether to use multisite settings.
- $not_use_https : bool
- Whether to use HTTPS.
- $notify_url : string
- Notification URL.
- $notify_url_not_https : string
- Notification URL without HTTPS.
- $ownsetting : bool
- Whether to use own settings.
- $redsyslanguage : string
- Language for Redsys.
- $secretsha256 : string
- Secret SHA-256 key.
- $supports : array<string|int, mixed>
- Supported features.
- $terminal : string
- Terminal ID.
- $testforuser : bool
- Whether test mode is enabled for a user.
- $testforuserid : array<string|int, mixed>
- User IDs for test mode.
- $testmode : bool
- Whether the gateway is in test mode.
- $testsha256 : string
- Test SHA-256 key.
- $testshowgateway : array<string|int, mixed>
- User IDs to show gateway in test mode.
- $testurl : string
- Test URL for payment.
- $testurlws : string
- Test URL for web service.
- $title : string
- Title of the gateway.
- $transactionlimit : int
- Transaction limit.
Methods
- __construct() : void
- Constructor for the gateway.
- admin_options() : mixed
- Admin Panel Options
- ask_for_refund() : bool|WP_Error
- Ask for Refund
- 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
- 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 redsys SHA256
- 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.
- 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.
- show_payment_method() : mixed
- Check if show gateway.
- successful_request() : mixed
- Successful Payment.
- warning_checkout_test_mode_bizum() : mixed
- Warning when Bizum is in test mode.
Properties
$butonbgcolor
Button background color.
public
string
$butonbgcolor
$butontextcolor
Button text color.
public
string
$butontextcolor
$buttoncheckout
Button text at checkout.
public
string
$buttoncheckout
$commercename
Commerce name.
public
string
$commercename
$customer
Customer ID.
public
string
$customer
$customtestsha256
Custom test SHA-256 key.
public
string
$customtestsha256
$debug
Whether debugging is enabled.
public
bool
$debug
$descripredsys
Description for Redsys.
public
string
$descripredsys
$description
Description of the gateway.
public
string
$description
$enabled
Whether the gateway is enabled.
public
bool
$enabled
$has_fields
Whether the gateway has fields.
public
bool
$has_fields
$hideownsetting
Whether to hide own settings.
public
bool
$hideownsetting
$icon
Gateway icon URL.
public
string
$icon
$id
Gateway ID.
public
string
$id
$liveurl
Live URL for payment.
public
string
$liveurl
$liveurlws
Live URL for web service.
public
string
$liveurlws
$log
Logger instance.
public
WC_Logger
$log
$method_description
Description of the payment method.
public
string
$method_description
$method_title
Title of the payment method.
public
string
$method_title
$multisitesttings
Whether to use multisite settings.
public
bool
$multisitesttings
$not_use_https
Whether to use HTTPS.
public
bool
$not_use_https
$notify_url
Notification URL.
public
string
$notify_url
$notify_url_not_https
Notification URL without HTTPS.
public
string
$notify_url_not_https
$ownsetting
Whether to use own settings.
public
bool
$ownsetting
$redsyslanguage
Language for Redsys.
public
string
$redsyslanguage
$secretsha256
Secret SHA-256 key.
public
string
$secretsha256
$supports
Supported features.
public
array<string|int, mixed>
$supports
$terminal
Terminal ID.
public
string
$terminal
$testforuser
Whether test mode is enabled for a user.
public
bool
$testforuser
$testforuserid
User IDs for test mode.
public
array<string|int, mixed>
$testforuserid
$testmode
Whether the gateway is in test mode.
public
bool
$testmode
$testsha256
Test SHA-256 key.
public
string
$testsha256
$testshowgateway
User IDs to show gateway in test mode.
public
array<string|int, mixed>
$testshowgateway
$testurl
Test URL for payment.
public
string
$testurl
$testurlws
Test URL for web service.
public
string
$testurlws
$title
Title of the gateway.
public
string
$title
$transactionlimit
Transaction limit.
public
int
$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_Errorcheck_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
booldisable_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 redsys SHA256
public
get_redsys_sha256(int $user_id) : string
Parameters
- $user_id : int
-
User ID.
Return values
stringget_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
boolprocess_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.
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.
warning_checkout_test_mode_bizum()
Warning when Bizum is in test mode.
public
warning_checkout_test_mode_bizum() : mixed