Boldd WooCommerce Checkout
Woocommerce Plugin for 1App and Boldd Payment Gateway
by Alexander Bamidele · github.com/oba4me/oneapp_woocommerce
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/oba4me/oneapp_woocommerce/archive/refs/heads/main.zipBoldd WooCommerce Checkout (OneApp)
Plugin: Boldd WooCommerce Checkout
Main file: oneapp-woocommerce-checkout.php
Version: 3.0.0
Author: Alexander Bamidele
License: GPL-2.0
Description
Integrates the OneApp / Boldd payment gateway with WooCommerce. Supports inline (popup) and standard (hosted) checkout flows, server-side verification, webhook handling and scheduled verification for pending orders. Uses gateway-provided Reference as the canonical transaction id.
Quick features
- Adds "Boldd" (id:
bolddcheckout) as a WooCommerce payment gateway. - Inline (JS popup) and Standard (redirect) checkout modes.
- Webhook endpoint to auto-complete orders on successful payment.
- AJAX endpoints for initiating payments and server-side verification.
- Scheduled cron job to verify pending/on‑hold orders.
- REST endpoint exposing the public key:
GET /wp-json/boldd/v1/public-key. - WooCommerce Blocks support for checkout block stores.
- HPOS / custom order tables compatibility declaration.
- Debug logging via WP_DEBUG.
Requirements
- PHP 8.0+
- WooCommerce 7.8+
- Merchant account & API keys at https://useboldd.com (OneApp)
- Currency: NGN, USD, GBP (plugin only available when store currency is NGN, USD, GBP)
Installation
- Copy the plugin folder to your WooCommerce plugins directory (wp-content/plugins/oneapp_woocommerce).
- Activate the plugin in WordPress Admin → Plugins.
- Configure via WooCommerce → Settings → Payments → Boldd Payment.
Configuration
Settings available in the gateway admin:
- Public Key
- Secret Key (server-side verification)
- Checkout Mode:
inlineorstandard - Dashboard URL (admin quick link)
- Webhook/Callback URL (shown in gateway settings):
https://your-site.example/?boldd_wc_webhook=1 - Blocks checkout script registered from the compiled
build/boldd-blocks.js
Endpoints & AJAX
- Webhook: POST to site with query
?boldd_wc_webhook=1(or legacyoneapp_wc_webhook=1). Processes payload, verifies, and completes matching order. - REST: GET /wp-json/boldd/v1/public-key — returns configured public key (permission: public).
- AJAX:
- Action
boldd_initiate_payment— initiate standard checkout (POST). - Action
boldd_verify_payment— server-side verify a reference (POST/GET via admin-ajax). - Action
oneapp_check_order_status— poll order status for client-side verification. - Action
oneapp_verify_on_redirect— legacy verify on redirect.
- Action
Cron / Scheduled Verification
- Adds
boldd_verify_pending_ordersscheduled event (hourly) on activation. - On deactivation the scheduled hook is cleared.
- Cron iterates pending/on-hold orders, verifies references with the API and completes orders when payment is confirmed.
- The gateway also keeps a short per-order cooldown so repeated refreshes and background checks do not spam the verify API.
Important implementation notes
- Main gateway class:
WC_Boldd_Gateway(extendsWC_Payment_Gateway). - Key helpers:
verify_reference_with_api($reference, $secret)— calls OneApp verifytrans API.initiate_payment_with_api(array $payload, $secret)— calls OneApp initiatetrans API.
- Order meta keys:
_boldd_initiated_reference— internal initiated reference used to map redirects._boldd_gateway_reference— canonical gateway reference returned by the gateway.
- The plugin sets transaction id on orders (uses
set_transaction_idwhen available). - Inline flow uses external script:
https://js.oneappgo.com/v1/checkout.js. - The gateway registers HPOS compatibility via
FeaturesUtil. - The checkout block integration registers a payment method script for WooCommerce Blocks.
Debugging & Troubleshooting
- Enable WP_DEBUG to get debug logs via error_log (prefixed with
[Boldd DEBUG]). - Check WooCommerce → Status → Logs for related entries.
- Use Sandbox/test credentials and the gateway's sample card data when available.
- Verify webhook URL and that your site accepts POST from the gateway.
Developer notes
- Entry file:
oneapp-woocommerce-checkout.php - Key hooks used:
woocommerce_payment_gateways,woocommerce_receipt_bolddcheckout,rest_api_init, admin-ajax hooks,initfor webhook handling, scheduled eventboldd_verify_pending_orders. - Currency check: plugin limits availability to stores using NGN, USD, GBP.
- Contributions and PRs welcome — follow WordPress PHP coding standards.
Support
For integration questions contact: oba4me@gmail.com | alex@1appgo.com | https://github.com/oba4me
License
GPL‑2.0 — see LICENSE in repository for full details.