POS Globalpay Terminal Payment DocumentationPOS Globalpay Terminal Payment Documentation
Buy Now
View Demo
  • Getting Started

    • Overview
    • Key Features
    • Installation
  • Configuration

    • Admin Settings
    • Node Server & SSL
  • Hardware & App

    • Mobile Terminal App
    • UPA Java Emulator
  • Operations

    • Checkout Workflow
    • Order Metadata
  • Support

    • Troubleshooting
    • FAQ
Core POS System
Buy Now
View Demo
  • Getting Started

    • Overview
    • Key Features
    • Installation
  • Configuration

    • Admin Settings
    • Node Server & SSL
  • Hardware & App

    • Mobile Terminal App
    • UPA Java Emulator
  • Operations

    • Checkout Workflow
    • Order Metadata
  • Support

    • Troubleshooting
    • FAQ
Core POS System
  • Getting Started

    • POS Globalpay Terminal Payment Documentation
    • System Overview
    • Detailed Features List
    • Plugin Installation
  • Setup & Configuration

    • Admin Gateway Configuration
    • Node.js Socket Server & Security Setup
  • Hardware & Emulator Setup

    • Globalpay Android Terminal App Setup
    • UPA Java Terminal Emulator Setup
  • Store Operations & Checkout

    • POS Checkout Workflow & Interactive Prompts
    • Order Fulfillment & Metadata Audit Logging
  • Help & FAQ

    • Troubleshooting Guide
    • Frequently Asked Questions (FAQ)

Node.js Socket Server & Security Setup

Physical Globalpay credit/debit card terminals communicate over low-latency TCP socket channels. To enable instant data transmission between the cashier's web browser interface and physical hardware, the plugin mounts a dedicated WebSocket bridge script into the native WooCommerce Point of Sale Node Server.


Accessing Node Server Configuration

Navigate to Point of Sale → Settings → Node Server in your WordPress administration sidebar.

Node Server Settings Screen


Configuration Settings

Core Server Settings

  • Node Server (Domain / IP) Address: The domain name or IP address (e.g. 192.168.15.127) of the server hosting the socket application.
  • Node Server PORT: The port number allocated for socket bridge listening (e.g. 5055 or 8081).
  • Server HTTPS Status: Select Enable or Disable SSL/TLS encryption.

    Important: If your WordPress site uses HTTPS (https://), you MUST set Server HTTPS Status to Enable and provide valid SSL certificate keys to prevent browser mixed-content security blocks.

  • Node Server Timeout: Connection retry timeout in milliseconds (e.g. 8000 ms).
  • Start/Stop Server Action: Quick action control button (Start Server / Stop Server) to launch or stop the Node server application directly from WordPress.

SSL Certificates Setup (for HTTPS Stores)

When HTTPS is enabled, scroll down to the Node Server SSL Keys (If Https) section:

Node Server SSL Keys Screen

  • SSL Certificate Keys: Paste the raw PEM-encoded certificate content (-----BEGIN CERTIFICATE-----...).
  • SSL Private Keys: Paste the raw PEM-encoded private key content (-----BEGIN PRIVATE KEY-----...).

Environment Health Checklist

The Node Server configuration screen provides real-time health validation checkmarks (✓) confirming environment readiness:

IndicatorDescriptionReadiness
Node PortValidates port assignment availability✓
HTTPSConfirms SSL protocol state configuration✓
Certificate KeyValidates SSL public certificate format and file path✓
Private KeyValidates SSL private key format and file path✓
API URLVerifies WordPress REST API endpoint routing✓
Site URLConfirms primary store domain URI configuration✓
Addons Server AddedConfirms Globalpay socket bridge extension registration✓

Socket Server Room Isolation & Event Protocol

The Node socket bridge (server/src/index.js) maintains isolated socket rooms for cashier sessions to prevent cross-talk between multiple store outlets:

// Room Name Generation
POS Room:    POS:wkposGlobalPayterminal-{email}-{id}
Mobile Room: MOBILE:wkposGlobalPayterminal-{email}-{id}

Event Protocol Reference

Event NameDirectionDescription
createGlobalPayPaymentPOS → TerminalTransmits checkout payment payload (baseAmount, invoiceNbr, Order ID) to terminal.
getMobileGlobalPayPaymentTerminal → POSTransmits transaction outcome callback (approval/decline) to POS cashier.
isGlobalPayPOSConnectedTerminal → POSPolls POS cashier session connection status.
isGlobalPayConnectedPOS → TerminalPolls payment terminal connection status.
unexpectedDisconnectServer → BothNotifies both clients of unexpected network disconnections and cleans up socket registries.

Multi-Layer Authentication & Security

1. Bearer JWT Token Verification

  • Cashier sessions issue a cryptographically signed Bearer JWT token stored in user cookies.
  • Socket connection requests verify tokens against WKWCPOS_Jwt_Auth::get_instance()->verify_token($token).
  • Requests lacking a valid token are rejected with an Invalid authorization token exception.

2. Role-Based Access Control

  • Restricts REST API endpoints (/wp-json/pos/v1/...) and socket channel binding strictly to users with Point of Sale Cashier or Administrator roles.

3. Nonce CSRF Protection

  • Critical AJAX actions and state modifications enforce WordPress Nonce verification.
Prev
Admin Gateway Configuration