GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - harunsekmen/woo-checkout-failover-guard: Checkout protection layer for WooCommerce. Intercepts payment gateway timeouts, unblocks frozen screens, and prevents duplicate charges.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
docs/assets
docs/assets
 
 
includes
includes
 
 
templates
templates
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README.tr.md
README.tr.md
 
 
composer.json
composer.json
 
 
woo-checkout-failover-guard.php
woo-checkout-failover-guard.php
 
 

Repository files navigation

๐Ÿ›ก๏ธ WooCommerce Checkout Failover & Payment Guard

๐Ÿ‡ฌ๐Ÿ‡ง English ยท ๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe

WooCommerce HPOS Ready License: GPL-3.0 PHP: 8.1+

A client-side protection layer that intercepts checkout timeouts, unblocks frozen payment screens, and helps shoppers complete their purchases safely without duplicate charges.

Developed and maintained by Harun Sekmen โ€” E-Commerce Systems Engineer & WooCommerce Developer.

โœ‰๏ธ Discuss Checkout Reliability ยท ๐Ÿ’ผ Upwork Profile ยท ๐Ÿ”— Main GitHub Profile


๐Ÿ“ธ Visual Previews & Operational Interface

1. In-Store Client Interceptor (Active Circuit Breaker)

When a payment gateway hangs or times out, the infinite loading spinner is unblocked, preventing cart abandonment and offering clear recovery options:

WooCommerce Checkout Circuit Breaker Preview

2. WordPress Admin Telemetry & Health Dashboard

Store administrators can review gateway latency benchmarks, view recent recovery events, and adjust timeout tripwires:

WooCommerce Checkout Guard Admin Telemetry


โšก The Problem It Solves

During traffic surges, flash sales, or temporary payment gateway processing delays (such as Stripe, PayPal, or local virtual POS latency), checkout requests can sometimes encounter HTTP 504 timeouts or drop silently:

  • Frozen Checkout Overlays: The checkout page gets stuck on an infinite gray loading spinner. Customers are left wondering whether their order went through.
  • Accidental Duplicate Orders: Frustrated shoppers often refresh the page or click "Place Order" repeatedly, risking multiple authorization attempts on their credit card.
  • Orphaned Pending Orders: Orders are left stuck in "Pending Payment" status in the database, requiring manual customer support intervention.

WooCommerce Checkout Failover & Payment Guard resolves this by introducing an asynchronous circuit breaker directly into the checkout submission flow. When a gateway exceeds a reasonable response window or returns a server error, the client unblocks the form, displays a helpful message with clear options, and preserves the customer's entered details.



๐Ÿ—๏ธ Architecture & Request Flow

The following sequence illustrates how the asynchronous circuit breaker intercepts latency spikes before duplicate authorizations occur:

sequenceDiagram
    autonumber
    actor Customer as Shopper
    participant Browser as Client (Checkout JS)
    participant WC as WooCommerce (Server)
    participant Gateway as Payment Gateway (Stripe/POS)

    Customer->>Browser: Clicks "Place Order"
    Browser->>Browser: Arm Circuit Breaker (Timeout Tripwire)
    Browser->>WC: POST /?wc-ajax=checkout
    WC->>Gateway: Process Payment API Request

    alt Gateway Responds Within Window (Happy Path)
        Gateway-->>WC: 200 OK (Authorized)
        WC-->>Browser: Redirect to /order-received/
        Browser->>Browser: Disarm Circuit Breaker
    else Gateway Latency Exceeds Threshold (Timeout Event)
        Browser->>Browser: Tripwire Fires (Abort Hang)
        Browser->>Customer: Unblock Overlay + Show Safe Recovery Prompt
        Note over Browser,Customer: Preserves form data & prevents duplicate charge
        Customer->>Browser: Retry or Choose Alternate Gateway
    end
Loading

๐Ÿ› ๏ธ Key Architectural Features

  • Asynchronous Timeout Interceptor: Disarms frozen loading overlays and restores checkout form interactivity when a gateway fails to respond in time.
  • Clean Customer Self-Recovery: Customers can easily retry the payment or switch to an alternate payment method without having to re-type address information.
  • Duplicate Charge Protection: Protects the order transaction state to help prevent repeated clicks from creating accidental double charges.
  • Gateway Telemetry in WP Admin: Gives store owners a clear view of gateway response times and timeout occurrences directly in the WooCommerce dashboard.
  • High-Performance Order Storage (HPOS) Ready: Built to work cleanly with modern WooCommerce custom order tables and standard checkout blocks.

๐Ÿ’ผ Checkout Optimization & Payment Engineering

Need a reliable, frictionless checkout experience tailored to your payment providers?

  • Frictionless Checkout Funnels: One-page checkouts, simplified form fields, and mobile wallet setups (Apple Pay & Google Pay).
  • Payment Gateway Integrations: Stripe, PayPal, Mollie, Klarna, or Turkish virtual POS providers (iyzico, PayTR, Garanti, Yapฤฑ Kredi).
  • Order State Integrity: Custom webhook handlers and idempotent order processing to eliminate stranded transactions.
  • Error Handling & UX: Helpful user notifications that keep customers informed instead of confused.

๐Ÿ“ฉ Let's talk: Send your inquiry to [email protected] or connect via Upwork.


๐Ÿš€ Developer Setup & Local Testing

  1. Clone into plugins directory:

    git clone https://github.com/harunsekmen/woo-checkout-failover-guard.git wp-content/plugins/woo-checkout-failover-guard
  2. Activate via WP-CLI:

    wp plugin activate woo-checkout-failover-guard
  3. Configure timeout thresholds: Go to WooCommerce > Failover Guard in WP Admin to adjust the latency threshold (default: 14,000ms) and inspect event logs.


๐Ÿ“„ License

This open-source project is licensed under the GNU General Public License v3.0.

About

Checkout protection layer for WooCommerce. Intercepts payment gateway timeouts, unblocks frozen screens, and prevents duplicate charges.

github.com/harunsekmen/woo-checkout-failover-guard

Topics

checkoutcircuit-breakerfailoverhpos-readypayment-gatewayspaypalstripetimeout-handlerwoocommercewordpress

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.