Order Fulfillment & Metadata Audit Logging
Immediately upon receiving a successful transaction approval callback from the Globalpay terminal:
1. WooCommerce Order Status Lifecycle
[ New POS Cart ] ---> [ Order Created: Pending Payment ] ---> [ Terminal Approval ] ---> [ Order Status: Completed ]
- Pending Payment: Set while the card transaction is active to reserve stock inventory and prevent double-deductions.
- Completed: Upgraded automatically in WooCommerce as soon as
getMobileGlobalPayPaymentcallback returns{ status: true }.
2. Saved Order Meta Audit Log
The plugin attaches comprehensive payment and audit metadata directly onto the WooCommerce order record:
// WooCommerce Order Custom Metadata Saved
_globalpay_transaction_id => "TXN-984210587",
_globalpay_reference_nbr => "REF-2489",
_globalpay_response_id => "RESP-00-SUCCESS",
_globalpay_ecr_id => "#Order_id 2489",
_globalpay_platform => "Globalpay Terminal SDK v1.0",
_globalpay_total_amount => "68.42",
Audit Field Descriptions
- Transaction ID: Unique authorization transaction identifier returned by Globalpay.
- Reference Number: Merchant transaction reference number.
- Response ID: Gateway response status code.
- ECR ID: Electronic Cash Register ID (
#Order_id XXXX). - Platform: Terminal hardware and SDK release version.
- Total Amount: Exact charged currency amount.
3. Invoice & Receipt Printing
- Upon order completion, the POS panel automatically triggers invoice receipt printing (via thermal printer or PDF generator) and sends an optional digital receipt copy via Email or WhatsApp.
