Namespace GatemiPayPal; constants GMPFW_*; hooks and options gmpfw_*. Everything below is applied in the plugin's code.
Gateway ids
gmpfw_paypal, gmpfw_card, gmpfw_applepay, gmpfw_googlepay, gmpfw_fastlane, and — only when switched on with gmpfw_apm_gateways_enabled — gmpfw_apm_ideal, gmpfw_apm_bancontact, gmpfw_apm_blik, gmpfw_apm_eps, gmpfw_apm_p24, gmpfw_apm_mybank, gmpfw_apm_trustly, gmpfw_apm_multibanco.
Filters: the PayPal order
| Filter |
Arguments |
|
gmpfw_create_order_request |
$payload, $cart or $order |
The Orders v2 create body, from the cart or from an order |
gmpfw_create_order_payload |
$payload, $order, $context |
The body for a server-side create (Place Order flow, APMs) |
gmpfw_button_create_order_payload |
$payload, $context |
The body for a button-initiated create |
gmpfw_purchase_unit |
$purchase_unit, $order |
One purchase unit |
gmpfw_order_line_items |
$items, $order |
Line items sent to PayPal |
gmpfw_order_item_name |
$name, $cart_item |
One item's name |
gmpfw_invoice_id |
$id, $order |
The invoice number (default: Invoice prefix + order number) |
gmpfw_payment_intent |
$intent, $gateway |
CAPTURE or AUTHORIZE |
gmpfw_create_order_vault_required |
$required, $context |
Whether the order must vault the method (saving or a subscription) |
gmpfw_display_prices_include_tax |
$incl |
Whether amounts are built tax-inclusive |
// Put the store's own reference on every PayPal order.
add_filter( 'gmpfw_purchase_unit', function ( $unit, $order ) {
$unit['description'] = 'Order from Example Store';
return $unit;
}, 10, 2 );
Filters: order status and money
| Filter |
Arguments |
Default |
gmpfw_order_status_after_capture |
$status, $order, $result |
completed with Auto-complete orders; on-hold for a pending capture |
gmpfw_order_status_after_authorize |
$status, $order, $result |
Authorized order status |
gmpfw_dispute_created_status |
$status, $order, $dispute_id |
Order status on dispute |
gmpfw_refund_amount |
$amount, $order |
The amount being refunded |
gmpfw_sca_decision |
$decision, $auth_result, $order |
The 3-D Secure decision from Liability shift handling |
gmpfw_process_payment_result |
null, $order, $gateway |
Return an array to short-circuit process_payment() |
gmpfw_gateway_supports |
$supports, $gateway_id |
The gateway's feature list |
Filters: storefront
| Filter |
Arguments |
|
gmpfw_should_enqueue_assets |
$context |
Whether to load the scripts on this request |
gmpfw_checkout_config |
$config |
The data handed to the checkout script |
gmpfw_sdk_v6_config |
$config |
The Web SDK v6 configuration |
gmpfw_sdk_query_args |
array() |
Extra SDK query arguments |
gmpfw_sdk_currency, gmpfw_sdk_currency_supported |
$currency (and $supported) |
The currency the SDK loads in, and whether PayPal supports it |
gmpfw_sdk_buyer_country |
$default |
Buyer country (sandbox testing) |
gmpfw_sdk_debug |
$default |
SDK debug mode |
gmpfw_express_button_enabled |
true, $location |
product, cart or express_checkout |
gmpfw_express_skip_review |
$skip, $order |
Default: Skip order review |
gmpfw_express_checkout_redirect |
$url, $order |
Where a shopper goes to review |
gmpfw_express_honor_approved_amount |
true, $order |
Keep the amount the buyer approved |
gmpfw_express_shipping_tax_tolerance |
$default, $order, $approved |
Allowed rounding difference |
gmpfw_server_side_shipping_enabled |
true |
Quote shipping on the server as the address changes |
gmpfw_shipping_address_valid |
$valid, $address |
Accept or refuse a PayPal shipping address |
gmpfw_show_pay_later_message |
true, $placement, $amount |
Show one Pay Later message |
gmpfw_show_save_payment_checkbox |
true, $gateway_id |
Show Save at checkout |
gmpfw_validate_checkout_before_popup |
true |
Validate the checkout form before opening PayPal |
gmpfw_checkout_validation_errors |
$errors, $context |
Errors found by that check |
gmpfw_applepay_operational, gmpfw_googlepay_operational, gmpfw_fastlane_operational |
true |
Return false to switch a surface off in code |
gmpfw_apm_gateways_enabled |
false |
Show the standalone local-method redirect gateways |
gmpfw_apm_definitions |
$apms |
The local methods (id, currency, countries) |
gmpfw_payment_methods |
$methods |
The General tab's method list |
gmpfw_locate_template |
$template, $name, array() |
Override a plugin template |
// No express buttons on the cart page.
add_filter( 'gmpfw_express_button_enabled', function ( $on, $location ) {
return 'cart' === $location ? false : $on;
}, 10, 2 );
Filters: webhooks, network and migration
| Filter |
Arguments |
|
gmpfw_webhook_force_online_verify |
false, $type |
Skip offline verification for an event type |
gmpfw_webhook_order_is_ours |
$ours, $order, $resource |
Final say on whether an event belongs to this store |
gmpfw_is_local_site |
detected value |
Return false to register webhooks on a reachable site with a local-looking address |
gmpfw_paypal_max_retries |
2 |
Retries for a failed PayPal request |
gmpfw_paypal_request_timeout |
15 |
Seconds |
gmpfw_request_is_https, gmpfw_trusted_proxy |
|
HTTPS detection behind a proxy |
gmpfw_recaptcha_allowed_hostnames |
array( $home ) |
Hostnames a reCAPTCHA token may come from |
gmpfw_migration_gateway_map |
the map |
Other plugins' gateway ids adopted; return an empty array to switch migration off |
gmpfw_migration_customer_id_candidates |
$ids, $subscription |
Vault customer ids tried for a migrated subscription |
gmpfw_shipping_carriers |
$carriers |
Carriers for tracking sent to PayPal |
gmpfw_modules |
$modules |
The modules booted |
Actions
| Action |
Arguments |
When |
gmpfw_payment_captured |
$order, $result |
After a capture is recorded |
gmpfw_payment_authorized |
$order, $result |
After an authorization |
gmpfw_credentials_connected |
$environment |
After an account is connected (sandbox / live) |
gmpfw_webhook_vault_event |
$type, $resource |
A vault token webhook |
gmpfw_fastlane_order_pending |
$order_id |
A Fastlane order awaiting payment |
gmpfw_before_express_button, gmpfw_after_express_button |
$location |
Around each express button container |
gmpfw_booted |
the container |
After every module has booted |
gmpfw_activated, gmpfw_deactivated, gmpfw_upgraded |
($old, $new for upgraded) |
Lifecycle |
REST routes
| Route |
|
POST /wp-json/gatemi-paypal/v1/webhook |
PayPal webhooks — public, trusted only after signature verification |
/wp-json/gatemi-paypal/v1/order-update-callback |
PayPal's shipping-change callback for express orders |
wc-ajax endpoints
gmpfw_create_order, gmpfw_paypal_return, gmpfw_apm_return, gmpfw_refresh_nonces, gmpfw_client_log, gmpfw_shipping_callback, gmpfw_express_approve, gmpfw_express_add_to_cart, gmpfw_express_restore_cart, gmpfw_express_order_details, gmpfw_fastlane_create_order, gmpfw_create_setup_token, gmpfw_create_setup_token_checkout; admin-only: gmpfw_refresh_status, gmpfw_prepare_account, gmpfw_test_webhook, gmpfw_switch_environment, gmpfw_generate_signup_link, gmpfw_login_seller, gmpfw_disconnect.
Shortcodes
| Shortcode |
|
[gmpfw_cart_buttons] |
The cart's express buttons (empty when the cart is) |
[gmpfw_product_buttons id="123"] |
A product's express buttons; id defaults to the current product |
[gmpfw_pay_later_message amount="49.99" placement="custom"] |
A Pay Later message for an amount |
[gmpfw_product_message id="123"] |
The Pay Later message for a product |
[gmpfw_cart_message] |
The Pay Later message for the cart |
Options
| Option |
|
gmpfw_settings |
Every store-wide setting; secrets encrypted |
gmpfw_encryption_key |
The key used for those secrets |
woocommerce_gmpfw_{gateway}_settings |
Title, description and per-gateway styling |
gmpfw_webhook_id_{env}, gmpfw_webhook_url_{env}, gmpfw_webhook_events_{env} |
The registered webhook per environment |
gmpfw_wh_* |
Claimed webhook event ids |
gmpfw_installed_version, gmpfw_activated_at |
Lifecycle |
| Key |
|
_gmpfw_paypal_order_id |
The PayPal order id |
_gmpfw_transaction_id, _gmpfw_authorization_id |
Capture and authorization ids |
_gmpfw_intent, _gmpfw_capture_status, _gmpfw_captured_amount, _gmpfw_captures |
Intent and capture ledger |
_gmpfw_auth_expires_at |
When the authorization expires |
_gmpfw_environment |
sandbox or live |
_gmpfw_payment_source |
PayPal, card, Venmo, Apple Pay… |
_gmpfw_paypal_fee, _gmpfw_paypal_net, _gmpfw_seller_protection |
From the capture |
_gmpfw_vault_token, _gmpfw_vault_type |
Saved method used |
_gmpfw_3ds_liability_shift, _gmpfw_3ds_enrollment, _gmpfw_3ds_auth_status, _gmpfw_3ds_decision |
3-D Secure result |
_gmpfw_dispute_id, _gmpfw_pre_dispute_status |
While a dispute is open |
_gmpfw_refunded_ids |
PayPal refund ids already recorded |
Product meta: _gmpfw_product_settings (the per-product button switches).
Logs
WooCommerce → Status → Logs: source gatemi-paypal-for-woocommerce (with Debug logging) and gmpfw-3ds (with 3D Secure logging).
Cron
gmpfw_webhook_daily_check — daily, first scheduled an hour after the plugin loads. It reconciles the webhook subscription with PayPal (re-creating one deleted in the PayPal dashboard), at most once a day per environment through the transient gmpfw_webhook_check_{env}, which the settings screen's own check shares. Cleared on deactivation. Access tokens and certificates expire through transients.