Ledger Direct
| 开发者 |
ledgerdirect
alexanderbuzz
|
| 更新时间 |
2026年11月13日 16:25 |
| PHP版本: |
8.2 及以上 |
| WordPress版本: |
7.1 |
| 版权: |
MIT |
| 版权网址: |
版权信息
|
详情介绍:
LedgerDirect is a WordPress plugin that allows you to accept direct payments in XRP, USDC, and RLUSD on the XRP Ledger, and in XAH on Xahau. It provides a seamless integration with WooCommerce, enabling merchants to receive payments directly in their XRP Ledger accounts without the need for intermediaries.
安装:
Minimum Requirements
- PHP version 8.2 or greater
- WordPress 6.7 or greater
- WooCommerce 8.6.1 or greater
Automatic installation
- Search for LedgerDirect plugin in the plugin section of your admin panel.
- Activate the plugin.
- Go to WooCommerce -> Settings -> Payments and enable the LedgerDirect gateway to manage the plugin settings.
- Configure the plugin settings, including your XRP Ledger account details and the currencies you want to
Manual installation
- Clone the repo from https://github.com/ledger-direct/ledger-direct-woocommerce into the 'plugins' directory.
- Run 'composer install --no-dev --no-scripts --optimize-autoloader' to install the composer dependencies.
- Activate the plugin.
- Go to WooCommerce -> Settings -> Payments and enable the LedgerDirect gateway to manage the plugin settings.
- Configure the plugin settings, including your XRP Ledger account details and the currencies you want to accept.
更新日志:
1.6.0
- Core 0.11.3: the payment request in the QR code and behind the Xaman button now names its network on the XRP Ledger too, as it already did on Xahau. Before, Xaman paid on whichever network the wallet had open, so an XRP payment scanned with a Xahau account opened a XAH payment of the same amount.
- The payment page uses @ledger-direct/payment-ui 0.4.0 instead of 0.1.1: the wallet library is xrpl-connect 1.0.0 with xrpl 5, and on Xahau and Stellar the page no longer offers the XRP Ledger's browser wallets.
- The wallet library's URL carries its file version, so a browser does not combine a copy cached before an update with a newer page script.
1.5.2
- Core 0.11.1: when the price oracles disagree, no price is quoted, instead of a rate up to five minutes old. An older rate stands in only when no oracle answers.
- Core 0.11.1: after a reset of the XRP Ledger testnet, only the first sync per receiving account sends a request the node rejects; the plugin remembers the reset, so later syncs continue without it.
- When no price is available for a new amount on an expired payment page, the page now says so and asks the customer to try again in a moment. Before, the button seemed to do nothing.
1.5.1
- An order is booked as paid exactly once. Overlapping checks of the same order could repeat the confirmation mails and the stock reduction.
1.5.0
- Xahau: XAH on the Xahau network, a chain of its own that speaks the XRP Ledger's protocol, paid by destination tag. New settings "Accept XAH on Xahau", the Xahau network and one receiving account per network, off by default; the checkout offers XAH once they are set. The payment request behind the QR code names the Xahau network, so Xaman offers to switch if it is set to another one; the browser-wallet buttons stay off on a Xahau page. Xahau has its own tables (ledger_direct_xahau_tx, ledger_direct_xahau_destination_tag, created on update) and shares nothing with the XRP Ledger, also for an account that exists on both. The background job syncs the configured account of each chain. Saving a Xahau account that is also the XRP Ledger's account on the same network shows a notice: the same address is a different account on each chain. Needs core 0.11.
- The payment types come from the core's chain catalogue: one per chain and asset, and a test that turns red when the core adds a chain the plugin has not decided on.
1.4.1
- Core 0.9: the synced transactions store the CTID in the column tx_ctid instead of ctid, the name every LedgerDirect plugin uses from now on (PostgreSQL reserves ctid for a system column). The column is renamed in place on the first request after the update; nothing changes for customers or merchants.
- Core 0.9: a transaction whose CTID is malformed is skipped during sync, and logged, instead of being stored truncated.
1.4.0
- New order status "XRPL payment incomplete": a payment that arrives but does not pay the order (too little, or another token) moves the order there, with a note saying what arrived, what was requested and what is still due. The order stays open, the page keeps polling, the background job keeps matching, and a top-up settles it. WooCommerce's hold-stock cancellation, which only cancels "Pending payment", leaves such orders alone.
- A LedgerDirect panel on the admin order page: the payment state, what was quoted (asset, amount, rate, account, destination tag, issuer, quote validity), what arrived, what is still due, the transaction, and every transaction on the order's destination tag linked to the explorer.
- The receiving accounts are validated as XRPL addresses when the settings are saved; another chain's address or a destination tag in the field is refused and the previous value kept.
- Core 0.8.1: a payment in the other asset class, a token sent for an XRP order or XRP for a token order, is reported as a wrong-token payment with the full amount still due, instead of being ignored. Before, the page stayed on "waiting" while the money sat on the ledger.
1.3.0
- The payment page is redesigned on the shared package @ledger-direct/payment-ui: the amount to send is the largest thing on the page with a copy button, the receiving address, the destination tag (marked as required) and, for tokens, the issuer are numbered fields with copy buttons, a countdown with a bar, one column on phones, dark mode follows the system.
- One QR code with the receiving address, the destination tag and the amount (for tokens also currency and issuer); a server-rendered code stays for browsers without JavaScript.
- Browser wallets over XRPL Connect (Crossmark, GemWallet, MetaMask Snap, Ledger, Otsu, Xyra) when detected; Xaman and WalletConnect when the merchant enters their public identifier in the settings. The wallet library is loaded only when the wallet list is opened.
- New settings: the logo of the payment page (site logo, a picture from the media library, or a monogram), an accent colour (refused when too light for white text), the Xaman API key and the WalletConnect project id.
- The plugin's scripts and styles load on the payment page only, no longer on every page of the site.
- Icons for XRP, RLUSD and USDC next to the payment options in the checkout.
- Requires hardcastle/ledger-direct-core 0.8.
1.2.0
- The payment page now follows the payment on its own: it polls every 8 seconds and shows one of five states - waiting (with a countdown for the quote), partial payment, payment in the wrong token, expired quote, and paid - and leaves for the order confirmation as soon as the order is paid or closed. No more reloading.
- New status endpoint
/wp-json/ledger-direct/v1/payment-status/<order key>, the same payload as every other LedgerDirect plugin. Access is by the order key, as on the "Order received" page, so guest orders work without a login.
- The ledger is synced at most once per five seconds per receiving account, however many customers are waiting; the background job is unaffected.
- An expired quote is no longer replaced silently on reload; the page says so and offers an updated amount on request.
- Whether a payment is in the wrong token is decided by the shared library, the same rule as on every other platform.
1.1.1
- Fix: an order that received a partial payment could never be completed. The first payment was recorded and the plugin stopped looking, so a customer who then sent the remaining amount was never marked as paid, neither on the payment page nor by the background job. Payments in the quoted asset now add up, and the order is matched until it settles.
- Fix: a payment in the right stablecoin from another issuer no longer blocks a later payment from the correct issuer.
- Core 0.7: the shared library is now required at ^0.7.
- Release build: a developer document that had been copied into the bundled library was shipped with 1.1.0; it is removed, and the build now refuses to ship such files.
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.