Ledger Direct

Description

LedgerDirect is a WordPress plugin that allows you to accept direct payments in XRP, USDC, and RLUSD on the XRP Ledger. It provides a seamless integration with WooCommerce, enabling merchants to receive payments directly in their XRP Ledger accounts without the need for intermediaries.

Features

  • Accept payments in XRP, USDC and RLUSD.
  • Receive payments directly to your wallet without any intermediaries.

How do I know if my XRP account is setup correctly?

The best way is to configure the plugin to use the testnet and make a test payment.

Test Payments

To test the plugin, you can configure it to use the XRP Ledger Testnet. This allows you to simulate transactions without using real funds. Follow these steps:
1. Go to the plugin settings in WooCommerce.
2. Enable the Testnet mode.
3. Use a XRP Ledger test account to make test payments.
5. You can create test account from https://xrpl.org/xrp-testnet-faucet.html for XRP or https://tryrlusd.com/ for RLUSD.

External services

LedgerDirect uses public APIs from Coinbase, Coingecko, Binance, and Kraken to retrieve current cryptocurrency exchange rates. These rates are needed to correctly calculate and display payments.

No personal or payment data is sent to these services. Only requests for current rates are made when a payment is processed or displayed.

For more information about each service, see:
– Coinbase API: Terms of Service, Privacy Policy
– Coingecko API: Terms of Service, Privacy Policy
– Binance API: Terms of Use, Privacy Policy
– Kraken API: Terms of Service, Privacy Policy

Source Code of minified assets

LedgerDirect uses minified assets for the WooCommerce blocks checkout. The source for includes/assets/js/frontend/blocks.asset.js is available at https://github.com/ledger-direct/ledger-direct-woocommerce/blob/main/resources/js/frontend/index.js.

LedgerDirect uses minified assets from third party libraries. The source for the QR code library (jquery-qrcode.min.js) is available at https://github.com/jeromeetienne/jquery-qrcode.

Installation

Minimum Requirements

  • PHP version 8.2 or greater
  • WordPress 6.7 or greater
  • WooCommerce 8.6.1 or greater

Automatic installation

  1. Search for LedgerDirect plugin in the plugin section of your admin panel.
  2. Activate the plugin.
  3. Go to WooCommerce -> Settings -> Payments and enable the LedgerDirect gateway to manage the plugin settings.
  4. Configure the plugin settings, including your XRP Ledger account details and the currencies you want to

Manual installation

  1. Clone the repo from https://github.com/ledger-direct/ledger-direct-woocommerce into the ‘plugins’ directory.
  2. Run ‘composer install –no-dev –no-scripts –optimize-autoloader’ to install the composer dependencies.
  3. Activate the plugin.
  4. Go to WooCommerce -> Settings -> Payments and enable the LedgerDirect gateway to manage the plugin settings.
  5. Configure the plugin settings, including your XRP Ledger account details and the currencies you want to accept.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Ledger Direct” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Ledger Direct” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.1.0

  • Core 0.4: the sync cursor is now kept per receiving account and network. A mainnet transaction can no longer stall the testnet sync, and a testnet reset no longer requires cleaning the database – the plugin resyncs on its own.
  • Core 0.3: when several transactions carry the same destination tag, the newest one in the quoted asset is used. A stray payment in another asset no longer blocks settlement of the real one.
  • Database schema version 3: network column on the transactions table, backfilled from the CTID; migrates automatically on the first request after the update.

1.0.0

  • The plugin is now an adapter over the shared hardcastle/ledger-direct-core library, so prices, exchange rates, destination tags, transaction sync and the settlement decision are identical across all LedgerDirect plugins.
  • Fix: XRP payments were only accepted when the delivered amount was at or below the requested amount. Overpayment now settles, and a shortfall of up to 0.15 % is tolerated, as in every other LedgerDirect plugin.
  • Fix: stablecoin payments were compared as raw arrays; a payment from another issuer is now always rejected and an overpayment accepted.
  • Fix: the RLUSD and USDC switches were wired to the wrong asset depending on the network.
  • Fix: the quote expiry setting was ignored (every quote lasted 15 hours). Quotes now expire as configured and are refreshed in place on the payment page, keeping the same destination tag.
  • New: orders are settled in the background every five minutes via Action Scheduler, so a customer who closes the payment page still gets their order marked paid.
  • New: the payment page shows how much of the requested amount has arrived and what is still missing.
  • New: exchange rates are cached briefly (60 s) so a checkout render no longer waits for three price oracles.
  • Database schema version 2: numeric ledger index, per-account destination-tag counter; migrates automatically on the first request after the update.
  • Requires PHP 8.2.

0.11.0

  • Fix: the destination-tag table existed under three different names across install.php and XrplTxService, so reserved destination tags were silently never persisted on fresh installs. Unified to ledger_direct_xrpl_destination_tag, with an automatic upgrade routine for existing installs.
  • Fix: add a unique constraint on the transactions table’s hash column to enforce deduplication at the database level.
  • Fix: KrakenOracle only ever returned a price for the XRP/USD pair (it read a hardcoded response key); it now reads any pair generically.
  • Fix: price oracle failures are now logged instead of silently discarded, to make pricing issues diagnosable.
  • Fix: the “change payment method” AJAX action always failed due to a typo reading the wrong POST field.
  • Add: order pricing metadata now includes base_asset and quote_currency fields alongside the existing pairing/exchange_rate/amount_requested.
  • Remove: the unused, always-returns-zero RippleOracle.
  • Internal: added automated tests, a CI pipeline (lint, coding standards, static analysis, PHPUnit, WordPress Plugin Check), and a WordPress.org SVN release workflow.