WC_Gateway_Apple_Pay_Checkout
extends WC_Payment_Gateway
in package
WC_Gateway_Google_Pay_Checkout class.
Tags
Table of Contents
Properties
- $butonbgcolor : string
- The button background color for the gateway.
- $butontextcolor : string
- The button text color for the gateway.
- $buttoncheckout : string
- The checkout button text for the gateway.
- $commercename : string
- The commerce name for the gateway.
- $customer : string
- The customer for the gateway.
- $customtestsha256 : string
- The custom test SHA256 for the gateway.
- $debug : bool
- Indicates if the gateway is in debug mode.
- $descripredsys : string
- The description of the gateway for Redsys.
- $description : string
- The description of the gateway.
- $enabled : bool
- Indicates if the gateway is enabled.
- $g_merchant_id : string
- The merchant ID for the gateway.
- $has_fields : bool
- Indicates if the gateway has fields.
- $hideownsetting : bool
- Indicates if the gateway hides its own setting.
- $icon : string
- The icon of the gateway.
- $id : string
- The ID of the gateway.
- $liveurl : string
- The live URL for the gateway.
- $log : string
- The log for the gateway.
- $merchant_id_key : string
- The merchant ID key for the gateway.
- $merchant_id_pem : string
- The merchant ID PEM for the gateway.
- $method_description : string
- The description of the gateway.
- $method_title : string
- The title of the gateway.
- $multisitesttings : bool
- Indicates if the gateway is used in a multisite setting.
- $not_use_https : bool
- Indicates if the gateway does not use HTTPS.
- $notify_url : string
- The notify URL for the gateway.
- $notify_url_not_https : string
- The notify URL without HTTPS for the gateway.
- $ownsetting : bool
- Indicates if the gateway has its own setting.
- $redsyslanguage : string
- The Redsys 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 purposes.
- $testforuserid : int
- The user ID for testing purposes.
- $testmode : bool
- Indicates if the gateway is in test mode.
- $testsha256 : string
- The test SHA256 for the gateway.
- $testshowgateway : bool
- Indicates if the gateway should be shown for testing purposes.
- $testurl : string
- The test URL for the gateway.
- $title : string
- The title of the gateway.
- $xpay_origen : string
- The XPay origin for the gateway.
- $xpay_type : string
- The XPay type for the gateway.
Methods
- __construct() : mixed
- Constructor
- 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 GPay HTTP Notification
- check_order_status_applepay() : void
- Check order status.
- check_payment_status() : void
- Check payment status.
- check_redsys_refund() : bool
- Check if the ping is from Redsys
- check_user_test_mode() : bool
- Check if this gateway is enabled in test mode for a user
- generate_redsys_form() : mixed
- Generate the redsys form
- get_checkout_price() : void
- Get the checkout price.
- 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
- handle_ajax_request_applepay() : mixed
- Handle_ajax_request_applepay function.
- handle_update_checkout_address() : mixed
- Handle_ajax_request_applepay function.
- 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.
- load_apple_pay_js() : mixed
- Load Apple Pay JS
- pay_order_applepay() : void
- Check payment status.
- 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_all_order_data_applepay() : mixed
- Save all order data from Apple Pay.
- save_field_update_order_meta() : mixed
- Save fields to checkout (Gpay).
- successful_request() : mixed
- Successful Payment.
- validate_merchant() : void
- Check order status.
Properties
$butonbgcolor
The button background color for the gateway.
public
string
$butonbgcolor
$butontextcolor
The button text color for the gateway.
public
string
$butontextcolor
$buttoncheckout
The checkout button text for the gateway.
public
string
$buttoncheckout
$commercename
The commerce name for the gateway.
public
string
$commercename
$customer
The customer for the gateway.
public
string
$customer
$customtestsha256
The custom test SHA256 for the gateway.
public
string
$customtestsha256
$debug
Indicates if the gateway is in debug mode.
public
bool
$debug
$descripredsys
The description of the gateway for Redsys.
public
string
$descripredsys
$description
The description of the gateway.
public
string
$description
$enabled
Indicates if the gateway is enabled.
public
bool
$enabled
$g_merchant_id
The merchant ID for the gateway.
public
string
$g_merchant_id
$has_fields
Indicates if the gateway has fields.
public
bool
$has_fields
$hideownsetting
Indicates if the gateway hides its own setting.
public
bool
$hideownsetting
$icon
The icon of the gateway.
public
string
$icon
$id
The ID of the gateway.
public
string
$id
$liveurl
The live URL for the gateway.
public
string
$liveurl
$log
The log for the gateway.
public
string
$log
$merchant_id_key
The merchant ID key for the gateway.
public
string
$merchant_id_key
$merchant_id_pem
The merchant ID PEM for the gateway.
public
string
$merchant_id_pem
$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 the gateway is used in a multisite setting.
public
bool
$multisitesttings
$not_use_https
Indicates if the gateway does not use HTTPS.
public
bool
$not_use_https
$notify_url
The notify URL for the gateway.
public
string
$notify_url
$notify_url_not_https
The notify URL without HTTPS for the gateway.
public
string
$notify_url_not_https
$ownsetting
Indicates if the gateway has its own setting.
public
bool
$ownsetting
$redsyslanguage
The Redsys 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 purposes.
public
bool
$testforuser
$testforuserid
The user ID for testing purposes.
public
int
$testforuserid
$testmode
Indicates if the gateway is in test mode.
public
bool
$testmode
$testsha256
The test SHA256 for the gateway.
public
string
$testsha256
$testshowgateway
Indicates if the gateway should be shown for testing purposes.
public
bool
$testshowgateway
$testurl
The test URL for the gateway.
public
string
$testurl
$title
The title of the gateway.
public
string
$title
$xpay_origen
The XPay origin for the gateway.
public
string
$xpay_origen
$xpay_type
The XPay type for the gateway.
public
string
$xpay_type
Methods
__construct()
Constructor
public
__construct() : mixed
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 GPay HTTP Notification
public
check_ipn_response() : mixed
check_order_status_applepay()
Check order status.
public
static check_order_status_applepay() : void
Tags
check_payment_status()
Check payment status.
public
static check_payment_status() : void
Tags
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_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
boolgenerate_redsys_form()
Generate the redsys form
public
generate_redsys_form(mixed $order_id) : mixed
Parameters
- $order_id : mixed
-
Order ID.
get_checkout_price()
Get the checkout price.
public
get_checkout_price() : void
Tags
get_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
stringhandle_ajax_request_applepay()
Handle_ajax_request_applepay function.
public
static handle_ajax_request_applepay() : mixed
handle_update_checkout_address()
Handle_ajax_request_applepay function.
public
static handle_update_checkout_address() : mixed
init_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
boolload_apple_pay_js()
Load Apple Pay JS
public
load_apple_pay_js([int $price = false ]) : mixed
Parameters
- $price : int = false
-
Price.
pay_order_applepay()
Check payment status.
public
static pay_order_applepay() : void
Tags
payment_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.
Tags
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_all_order_data_applepay()
Save all order data from Apple Pay.
public
static save_all_order_data_applepay() : mixed
Tags
save_field_update_order_meta()
Save fields to checkout (Gpay).
public
save_field_update_order_meta(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
successful_request()
Successful Payment.
public
successful_request(array<string|int, mixed> $posted) : mixed
Parameters
- $posted : array<string|int, mixed>
-
Post data after notify.
validate_merchant()
Check order status.
public
validate_merchant() : void