Skip to main content
You are here:
Print

A Dogecoin test proves three things at once: that the shop wallet can spend the Dogecoin it receives, that the product sells at the amount the buyer expects, and that a payment finds its way back into the order. Dogecoin support is included in the Professional plan of the Cryptocurrency Product for WooCommerce, with no separate Dogecoin add-on to buy or install.

This article describes version 4.1.1 of the Cryptocurrency Product for WooCommerce, which requires PHP 8.1 or later.

Step 1. Choose the network

Dogecoin has no test chain in the plugin: the coin description carries an empty test-chain explorer, and a Dogecoin product has no Use testnet (Dogecoin) switch. A Dogecoin test therefore runs on the Dogecoin mainnet with a deliberately tiny amount — Dogecoin is cheap enough that a single product plus its fee costs very little, and the amount is the whole budget of the test. Bitcoin and Litecoin offer a test chain; Dogecoin does not, and the plugin says so by not offering the switch rather than by offering one that changes nothing.

Step 2. Create the test product

Open Settings -> Cryptocurrency Product, tab Dogecoin, and check that a wallet key is set: the Dogecoin wallet address row shows the address the shop pays from. Then go to Products -> Add New, fill in Name and Description, check Cryptocurrency and Virtual, and set Regular price in the store currency. Open the Cryptocurrency tab, choose Dogecoin (DOGE) in The cryptocurrency, and set Minimum amount and Step to the smallest pair you want to sell — for a test, an amount small enough that the mainnet spend is trivial.

Product settings for a UTXO coin: minimum amount, step and the transaction fee level

Set Tx fee (Dogecoin) to Medium: low means a long wait for the first confirmation, high costs more than a test needs. Press Publish.

Step 3. Fund the shop wallet

Send the test amount of Dogecoin to the address shown on the Dogecoin settings tab. Make the transfer a little larger than the product price plus the fee, so the shop has one unspent output big enough to spend and a remainder to send back. The plugin spends from the outputs it can see, so wait until the transfer carries the number of confirmations the Confirmations row asks for; the default is 2.

The Dogecoin settings tab: the wallet address to fund and the confirmation row

Step 4. Buy the product

Open the shop as a customer, add the product to the cart and go to the checkout. A Dogecoin address field is asked next to the shipping fields — fill in a wallet you control, because the shop pays the Dogecoin there when the order is processed. Complete the order with any payment method the shop offers for the rest of the total.

Step 5. Read the order notes

Open WooCommerce -> Orders and the new order. It arrives with the status On hold. The shop sends the Dogecoin from its own wallet, and when the transaction is broadcast the order notes take a new entry with the transaction hash and a link to the explorer. Wait for the confirmation the plugin requires, then reload the order: the status moves from On hold to Processing and the stock goes down. If the status stays on hold, the notes say why — an unconfirmed input, a fee too low for the current chain, or a wallet with nothing to spend.

Money leaves the shop through the private key stored on the server, so protect it before you test with any real balance. Stored private keys are encrypted at rest once the administrator sets an Encryption key file path: the key file lives outside the site directory (create the directory with 0700 permissions and the key file with 0400, or 0600, owned by the user the web service runs as). There is no default path and nothing is created for you: until a path is set the plugin keeps the legacy unencrypted scheme and shows a red admin notice asking for a path.

Delete the test product when the test is done and leave the leftover Dogecoin where it is or send it back to your own wallet. The settings stay as they are: the key, the token and the confirmations are shop-wide, and a live product uses them unchanged.

Categories: